rewrite: New Video channels and moderation.

This commit is contained in:
2023-08-15 14:03:23 +03:00
parent 7e6217a2ae
commit 2cc90375c7
21 changed files with 2227 additions and 11 deletions

View File

@@ -367,6 +367,7 @@ class RoleSetting(InteractiveSetting[ParentID, int, Union[discord.Role, discord.
_accepts = _p('settype:role|accepts', "A role name or id")
_selector_placeholder = "Select a Role"
_allow_object = True
@classmethod
def _get_guildid(cls, parent_id: int, **kwargs) -> int:
@@ -399,7 +400,7 @@ class RoleSetting(InteractiveSetting[ParentID, int, Union[discord.Role, discord.
guild = bot.get_guild(guildid)
if guild is not None:
role = guild.get_role(data)
if role is None:
if role is None and cls._allow_object:
role = discord.Object(id=data)
return role