Added mass-move command #136

Merged
edraft merged 4 commits from #20 into 0.3 2022-11-21 19:00:35 +01:00
3 changed files with 9 additions and 3 deletions
Showing only changes of commit 2868b1afe2 - Show all commits

@ -1 +1 @@
Subproject commit 57dd85de79d51893e5f5e5bd7f7d6065ba923f21
Subproject commit e7e9d85f7d0054ba95ae1ff87d91b4e218ef510f

View File

@ -151,6 +151,10 @@
},
"footer": ""
},
"mass_move": {
"moved": "Alle Personen aus {} wurden nach {} verschoben.",
"channel_from_error": "Du musst dich in einem Voicechannel befinden oder die Option \"channel_from\" mit angeben."
},
"presence": {
"changed": "Presence wurde geändert.",
"removed": "Presence wurde entfernt.",

View File

@ -35,8 +35,8 @@ class MassMoveCommand(DiscordCommandABC):
channel_from: discord.VoiceChannel = None):
self._logger.debug(__name__, f'Received command mass-move {ctx}')
if channel_from is None and ctx.author.voice.channel is None:
##Hier den User benachrichtigen, dass er nicht in einem Channel sitzt.
if channel_from is None and ctx.author.voice is None:
await self._message_service.send_ctx_msg(ctx, self._t.transform('modules.base.mass_move.channel_from_error'))
return
if channel_from is None:
@ -45,4 +45,6 @@ class MassMoveCommand(DiscordCommandABC):
moves = [member.move_to(channel_to) for member in channel_from.members]
await asyncio.gather(*moves)
await self._message_service.send_ctx_msg(ctx, self._t.transform('modules.base.mass_move.moved', channel_from.name, channel_to.name))
self._logger.trace(__name__, f'Finished mass-move command')