forked from sh-edraft.de/sh_discord_bot
Merge pull request '0.3 - received command in allen neuen Befehlen (#105)' (#106) from #105 into 0.3
Reviewed-on: sh-edraft.de/kd_discord_bot#106 Reviewed-by: Ebola-Chan <nick.jungmann@gmail.com> Closes #105
This commit is contained in:
commit
2613fcc999
@ -60,6 +60,7 @@ class AutoRoleGroup(DiscordCommandABC):
|
||||
self._logger.debug(__name__, f'Received command auto-role list {ctx}')
|
||||
if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx):
|
||||
return
|
||||
self._client_utils.received_command(ctx.guild.id)
|
||||
|
||||
if not self._permissions.is_member_moderator(ctx.author):
|
||||
await self._message_service.send_ctx_msg(ctx, self._t.transform('common.no_permission_message'))
|
||||
@ -98,6 +99,7 @@ class AutoRoleGroup(DiscordCommandABC):
|
||||
self._logger.debug(__name__, f'Received command auto-role add {ctx} {message_id}')
|
||||
if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx):
|
||||
return
|
||||
self._client_utils.received_command(ctx.guild.id)
|
||||
|
||||
if not self._permissions.is_member_moderator(ctx.author):
|
||||
await self._message_service.send_ctx_msg(ctx, self._t.transform('common.no_permission_message'))
|
||||
@ -144,6 +146,7 @@ class AutoRoleGroup(DiscordCommandABC):
|
||||
self._logger.debug(__name__, f'Received command auto-role remove {ctx} {auto_role}')
|
||||
if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx):
|
||||
return
|
||||
self._client_utils.received_command(ctx.guild.id)
|
||||
|
||||
if not self._permissions.is_member_moderator(ctx.author):
|
||||
await self._message_service.send_ctx_msg(ctx, self._t.transform('common.no_permission_message'))
|
||||
@ -184,6 +187,7 @@ class AutoRoleGroup(DiscordCommandABC):
|
||||
self._logger.debug(__name__, f'Received command auto-role rule list {ctx}')
|
||||
if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx):
|
||||
return
|
||||
self._client_utils.received_command(ctx.guild.id)
|
||||
|
||||
if not self._permissions.is_member_moderator(ctx.author):
|
||||
await self._message_service.send_ctx_msg(ctx, self._t.transform('common.no_permission_message'))
|
||||
@ -227,6 +231,7 @@ class AutoRoleGroup(DiscordCommandABC):
|
||||
self._logger.debug(__name__, f'Received command auto-role add {ctx} {auto_role}')
|
||||
if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx):
|
||||
return
|
||||
self._client_utils.received_command(ctx.guild.id)
|
||||
|
||||
if not self._permissions.is_member_moderator(ctx.author):
|
||||
await self._message_service.send_ctx_msg(ctx, self._t.transform('common.no_permission_message'))
|
||||
@ -285,6 +290,7 @@ class AutoRoleGroup(DiscordCommandABC):
|
||||
self._logger.debug(__name__, f'Received command auto-role remove {ctx} {auto_role_rule}')
|
||||
if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx):
|
||||
return
|
||||
self._client_utils.received_command(ctx.guild.id)
|
||||
|
||||
if not self._permissions.is_member_moderator(ctx.author):
|
||||
await self._message_service.send_ctx_msg(ctx, self._t.transform('common.no_permission_message'))
|
||||
|
@ -41,7 +41,6 @@ class PurgeCommand(DiscordCommandABC):
|
||||
self._logger.debug(__name__, f'Received command purge {ctx}')
|
||||
if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx):
|
||||
return
|
||||
|
||||
self._client_utils.received_command(ctx.guild.id)
|
||||
server_settings: ServerSettings = self._config.get_configuration(f'ServerSettings_{ctx.guild.id}')
|
||||
|
||||
|
@ -47,6 +47,7 @@ class RestartCommand(DiscordCommandABC):
|
||||
self._logger.debug(__name__, f'Received command restart {ctx}')
|
||||
if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx):
|
||||
return
|
||||
self._client_utils.received_command(ctx.guild.id)
|
||||
|
||||
self._client_utils.received_command(ctx.guild.id)
|
||||
|
||||
|
@ -47,6 +47,7 @@ class ShutdownCommand(DiscordCommandABC):
|
||||
self._logger.debug(__name__, f'Received command shutdown {ctx}')
|
||||
if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx):
|
||||
return
|
||||
self._client_utils.received_command(ctx.guild.id)
|
||||
|
||||
self._client_utils.received_command(ctx.guild.id)
|
||||
|
||||
|
@ -78,6 +78,7 @@ class LevelGroup(DiscordCommandABC):
|
||||
self._logger.debug(__name__, f'Received command level list {ctx}')
|
||||
if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx):
|
||||
return
|
||||
self._client_utils.received_command(ctx.guild.id)
|
||||
|
||||
if not self._permissions.is_member_moderator(ctx.author):
|
||||
await self._message_service.send_ctx_msg(ctx, self._t.transform('common.no_permission_message'))
|
||||
@ -117,6 +118,9 @@ class LevelGroup(DiscordCommandABC):
|
||||
@commands.guild_only()
|
||||
async def create(self, ctx: Context, name: str, color: str, min_xp: int, permissions: int):
|
||||
self._logger.debug(__name__, f'Received command level create {ctx}')
|
||||
if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx):
|
||||
return
|
||||
self._client_utils.received_command(ctx.guild.id)
|
||||
|
||||
try:
|
||||
color = hex(discord.Colour.from_str(color).value)
|
||||
@ -130,9 +134,6 @@ class LevelGroup(DiscordCommandABC):
|
||||
self._logger.error(__name__, f'Error parsing permissions {permissions}', e)
|
||||
return
|
||||
|
||||
if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx):
|
||||
return
|
||||
|
||||
if ctx.guild is None:
|
||||
return
|
||||
|
||||
@ -194,9 +195,9 @@ class LevelGroup(DiscordCommandABC):
|
||||
@commands.guild_only()
|
||||
async def remove(self, ctx: Context, level: str):
|
||||
self._logger.debug(__name__, f'Received command level remove {ctx}')
|
||||
|
||||
if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx):
|
||||
return
|
||||
self._client_utils.received_command(ctx.guild.id)
|
||||
|
||||
if not self._permissions.is_member_admin(ctx.author):
|
||||
await self._message_service.send_ctx_msg(ctx, self._t.transform('common.no_permission_message'))
|
||||
@ -243,6 +244,7 @@ class LevelGroup(DiscordCommandABC):
|
||||
self._logger.debug(__name__, f'Received command level down {ctx} {member}')
|
||||
if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx):
|
||||
return
|
||||
self._client_utils.received_command(ctx.guild.id)
|
||||
|
||||
if not self._permissions.is_member_moderator(ctx.author):
|
||||
await self._message_service.send_ctx_msg(ctx, self._t.transform('common.no_permission_message'))
|
||||
@ -284,6 +286,7 @@ class LevelGroup(DiscordCommandABC):
|
||||
self._logger.debug(__name__, f'Received command level up {ctx} {member}')
|
||||
if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx):
|
||||
return
|
||||
self._client_utils.received_command(ctx.guild.id)
|
||||
|
||||
if not self._permissions.is_member_moderator(ctx.author):
|
||||
await self._message_service.send_ctx_msg(ctx, self._t.transform('common.no_permission_message'))
|
||||
@ -325,6 +328,7 @@ class LevelGroup(DiscordCommandABC):
|
||||
self._logger.debug(__name__, f'Received command level up {ctx} {member}')
|
||||
if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx):
|
||||
return
|
||||
self._client_utils.received_command(ctx.guild.id)
|
||||
|
||||
if not self._permissions.is_member_moderator(ctx.author):
|
||||
await self._message_service.send_ctx_msg(ctx, self._t.transform('common.no_permission_message'))
|
||||
|
@ -55,6 +55,7 @@ class StatsGroup(DiscordCommandABC):
|
||||
self._logger.debug(__name__, f'Received command stats list {ctx}')
|
||||
if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx):
|
||||
return
|
||||
self._client_utils.received_command(ctx.guild.id)
|
||||
|
||||
if not self._permissions.is_member_moderator(ctx.author):
|
||||
await self._message_service.send_ctx_msg(ctx, self._t.transform('common.no_permission_message'))
|
||||
@ -94,6 +95,7 @@ class StatsGroup(DiscordCommandABC):
|
||||
self._logger.debug(__name__, f'Received command stats view {ctx}:{name}')
|
||||
if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx):
|
||||
return
|
||||
self._client_utils.received_command(ctx.guild.id)
|
||||
|
||||
if not self._permissions.is_member_moderator(ctx.author):
|
||||
await self._message_service.send_ctx_msg(ctx, self._t.transform('common.no_permission_message'))
|
||||
@ -141,6 +143,7 @@ class StatsGroup(DiscordCommandABC):
|
||||
self._logger.debug(__name__, f'Received command stats add {ctx}: {name}')
|
||||
if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx):
|
||||
return
|
||||
self._client_utils.received_command(ctx.guild.id)
|
||||
|
||||
if not self._permissions.is_member_technician(ctx.author):
|
||||
await self._message_service.send_ctx_msg(ctx, self._t.transform('common.no_permission_message'))
|
||||
@ -162,6 +165,7 @@ class StatsGroup(DiscordCommandABC):
|
||||
self._logger.debug(__name__, f'Received command stats edit {ctx}: {name}')
|
||||
if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx):
|
||||
return
|
||||
self._client_utils.received_command(ctx.guild.id)
|
||||
|
||||
if not self._permissions.is_member_technician(ctx.author):
|
||||
await self._message_service.send_ctx_msg(ctx, self._t.transform('common.no_permission_message'))
|
||||
@ -192,6 +196,7 @@ class StatsGroup(DiscordCommandABC):
|
||||
self._logger.debug(__name__, f'Received command stats remove {ctx}: {name}')
|
||||
if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx):
|
||||
return
|
||||
self._client_utils.received_command(ctx.guild.id)
|
||||
|
||||
if not self._permissions.is_member_technician(ctx.author):
|
||||
await self._message_service.send_ctx_msg(ctx, self._t.transform('common.no_permission_message'))
|
||||
|
Loading…
Reference in New Issue
Block a user