mirror of
https://github.com/NoiTheCat/WorldTime.git
synced 2024-11-21 14:34:36 +00:00
Fix incorrect user check on set-for
This commit is contained in:
parent
6da3933eb8
commit
3d0f11a2cf
1 changed files with 2 additions and 2 deletions
|
@ -167,7 +167,7 @@ public class ApplicationCommands : InteractionModuleBase<ShardedInteractionConte
|
||||||
[SlashCommand("set-for", HelpSetFor)]
|
[SlashCommand("set-for", HelpSetFor)]
|
||||||
public async Task CmdSetFor([Summary(description: "The user whose time zone to modify.")] SocketGuildUser user,
|
public async Task CmdSetFor([Summary(description: "The user whose time zone to modify.")] SocketGuildUser user,
|
||||||
[Summary(description: "The new time zone to set.")] string zone) {
|
[Summary(description: "The new time zone to set.")] string zone) {
|
||||||
if (!IsUserAdmin(user)) {
|
if (!IsUserAdmin((SocketGuildUser)Context.User)) {
|
||||||
await RespondAsync(ErrNotAllowed, ephemeral: true).ConfigureAwait(false);
|
await RespondAsync(ErrNotAllowed, ephemeral: true).ConfigureAwait(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -194,7 +194,7 @@ public class ApplicationCommands : InteractionModuleBase<ShardedInteractionConte
|
||||||
[RequireGuildContext]
|
[RequireGuildContext]
|
||||||
[SlashCommand("remove-for", HelpRemoveFor)]
|
[SlashCommand("remove-for", HelpRemoveFor)]
|
||||||
public async Task CmdRemoveFor([Summary(description: "The user whose time zone to remove.")] SocketGuildUser user) {
|
public async Task CmdRemoveFor([Summary(description: "The user whose time zone to remove.")] SocketGuildUser user) {
|
||||||
if (!IsUserAdmin(user)) {
|
if (!IsUserAdmin((SocketGuildUser)Context.User)) {
|
||||||
await RespondAsync(ErrNotAllowed, ephemeral: true).ConfigureAwait(false);
|
await RespondAsync(ErrNotAllowed, ephemeral: true).ConfigureAwait(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue