[WIP] Added auto roles list #134
This commit is contained in:
@@ -45,16 +45,19 @@ class AutoRoleFilter(FilterABC):
|
||||
query = query.where(lambda x: x.id == self._id)
|
||||
|
||||
if self._channel_id is not None:
|
||||
query = query.where(lambda x: x.discord_channel_id == self._channel_id)
|
||||
|
||||
if self._channel_name is not None and self._channel_id is not None:
|
||||
query = query.where(
|
||||
lambda x: self._bot.get_channel(x.discord_channel_id).name == self._channel_name
|
||||
or self._channel_name in self._bot.get_channel(x.discord_channel_id).name
|
||||
lambda x: x.discord_channel_id == self._channel_id or str(self._channel_id) in str(x.discord_channel_id)
|
||||
)
|
||||
|
||||
if self._channel_name is not None:
|
||||
query = query.where(
|
||||
lambda x: x.discord_channel_name == self._channel_name or self._channel_name in x.discord_channel_name
|
||||
)
|
||||
|
||||
if self._message_id is not None:
|
||||
query = query.where(lambda x: x.discord_message_id == self._message_id)
|
||||
query = query.where(
|
||||
lambda x: x.discord_message_id == self._message_id or str(self._message_id) in str(x.discord_message_id)
|
||||
)
|
||||
|
||||
if self._server is not None:
|
||||
servers = self._server.filter(query.select(lambda x: x.server)).select(lambda x: x.id)
|
||||
|
Reference in New Issue
Block a user