Added received command to new commands #105
This commit is contained in:
@@ -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'))
|
||||
|
Reference in New Issue
Block a user