mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-05 17:02:32 -05:00
Send to owners (#2738)
* Add bot.send_to_owner resolves #2665 Adds some basic methods and config entries. Does not add commands for modifying this yet. * Use send_to_owners in events * handle feedback
This commit is contained in:
@@ -120,24 +120,12 @@ def init_events(bot, cli_flags):
|
||||
"but you're using {}".format(data["info"]["version"], red_version)
|
||||
)
|
||||
|
||||
owners = []
|
||||
owner = bot.get_user(bot.owner_id)
|
||||
if owner is not None:
|
||||
owners.append(owner)
|
||||
|
||||
for co_owner in bot._co_owners:
|
||||
co_owner = bot.get_user(co_owner)
|
||||
if co_owner is not None:
|
||||
owners.append(co_owner)
|
||||
|
||||
for owner in owners:
|
||||
with contextlib.suppress(discord.HTTPException):
|
||||
await owner.send(
|
||||
"Your Red instance is out of date! {} is the current "
|
||||
"version, however you are using {}!".format(
|
||||
data["info"]["version"], red_version
|
||||
)
|
||||
)
|
||||
await bot.send_to_owners(
|
||||
"Your Red instance is out of date! {} is the current "
|
||||
"version, however you are using {}!".format(
|
||||
data["info"]["version"], red_version
|
||||
)
|
||||
)
|
||||
INFO2 = []
|
||||
|
||||
mongo_enabled = storage_type() != "JSON"
|
||||
|
||||
Reference in New Issue
Block a user