Compare commits
4 Commits
1.2.5
...
a917803eff
Author | SHA1 | Date | |
---|---|---|---|
a917803eff | |||
acfa359eeb | |||
baf7b8d7de | |||
ee69ae58d1 |
Submodule bot/src/bot/config updated: eeebd13f80...be5b15f227
@@ -50,7 +50,10 @@ class AFKCommand(DiscordCommandABC):
|
||||
self._logger.debug(__name__, f"Received command afk {ctx}")
|
||||
settings: ServerConfig = self._config.get_configuration(f"ServerConfig_{ctx.guild.id}")
|
||||
|
||||
if ctx.author.voice is None or ctx.author.voice.channel is None:
|
||||
if member is None:
|
||||
member = ctx.author
|
||||
|
||||
if member.voice is None or member.voice.channel is None:
|
||||
await self._message_service.send_ctx_msg(
|
||||
ctx,
|
||||
self._t.transform("modules.base.afk_command_channel_missing_message"),
|
||||
@@ -63,10 +66,7 @@ class AFKCommand(DiscordCommandABC):
|
||||
)
|
||||
channel: VoiceChannel = ctx.guild.get_channel(settings.afk_command_channel_id)
|
||||
try:
|
||||
if member is not None:
|
||||
await member.move_to(channel)
|
||||
else:
|
||||
await ctx.author.move_to(channel)
|
||||
await member.move_to(channel)
|
||||
self._client_utils.moved_user(ctx.guild.id)
|
||||
except Exception as e:
|
||||
self._logger.error(
|
||||
|
@@ -93,11 +93,11 @@ export class ScheduledEventsComponent extends ComponentWithTable implements OnIn
|
||||
|
||||
public ngOnInit(): void {
|
||||
this.loading = true;
|
||||
this.setFilterForm();
|
||||
this.data.getServerFromRoute(this.route).then(async server => {
|
||||
this.server = server;
|
||||
let authUser = await this.authService.getLoggedInUser();
|
||||
this.user = authUser?.users?.find(u => u.server == this.server.id) ?? null;
|
||||
this.setFilterForm();
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user