mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 18:27:59 -05:00
[Core] Embeds toggle for channels. (#3418)
* [Core] Embedset toggle for channels. * Typo fix * Add to contact as well Thanks Jack. * Add guild only and check.
This commit is contained in:
committed by
Michael H
parent
de4804863a
commit
41fdcb2ae8
@@ -121,6 +121,7 @@ class RedBase(commands.GroupMixin, BotBase, RPCMixin): # pylint: disable=no-mem
|
||||
autoimmune_ids=[],
|
||||
)
|
||||
|
||||
self._config.register_channel(embeds=None)
|
||||
self._config.register_user(embeds=None)
|
||||
|
||||
self._config.init_custom(CUSTOM_GROUPS, 2)
|
||||
@@ -622,6 +623,9 @@ class RedBase(commands.GroupMixin, BotBase, RPCMixin): # pylint: disable=no-mem
|
||||
if user_setting is not None:
|
||||
return user_setting
|
||||
else:
|
||||
channel_setting = await self._config.channel(channel).embeds()
|
||||
if channel_setting is not None:
|
||||
return channel_setting
|
||||
guild_setting = await self._config.guild(channel.guild).embeds()
|
||||
if guild_setting is not None:
|
||||
return guild_setting
|
||||
|
||||
Reference in New Issue
Block a user