Skip to content

Commit

Permalink
Merge pull request #138 from bealsbe/kuro/permsfix
Browse files Browse the repository at this point in the history
Changed preconditions for administration module
  • Loading branch information
iShauny authored Dec 9, 2020
2 parents 2f151e6 + 57b0014 commit 3978d74
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Floofbot/Modules/Administration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public async Task kickUser(
[Alias("w")]
[Summary("Warns a user on the server, with a given reason")]
[RequireContext(ContextType.Guild)]
[RequireUserPermission(GuildPermission.BanMembers)]
[RequireUserPermission(GuildPermission.KickMembers)]
public async Task warnUser(
[Summary("user")] string user,
[Summary("reason")][Remainder] string reason = "")
Expand Down Expand Up @@ -348,7 +348,7 @@ public async Task warnUser(
[Alias("un")]
[Summary("Add a moderation-style user note, give a specified reason")]
[RequireContext(ContextType.Guild)]
[RequireUserPermission(GuildPermission.BanMembers)]
[RequireUserPermission(GuildPermission.KickMembers)]
public async Task userNote(
[Summary("user")] string user,
[Summary("reason")][Remainder] string reason = "")
Expand Down Expand Up @@ -411,7 +411,7 @@ public async Task userNote(
[Alias("p")]
[Summary("Deletes recent messages from a given user for all channels on the server")]
[RequireContext(ContextType.Guild)]
[RequireUserPermission(GuildPermission.BanMembers)]
[RequireUserPermission(GuildPermission.ManageMessages)]
public async Task PurgeUserMessages(
[Summary("user")] string user)
{
Expand Down Expand Up @@ -480,7 +480,7 @@ public async Task warnlog([Summary("user")] string user = "")
}
else // a mod
{
if (selfUser.GuildPermissions.BanMembers) // want to view their own warnlog
if (selfUser.GuildPermissions.KickMembers) // want to view their own warnlog
{
IUser badUser = resolveUser(user);
if (badUser == null)
Expand Down Expand Up @@ -511,7 +511,7 @@ public async Task warnlog([Summary("user")] string user = "")
[Command("forgive", RunMode = RunMode.Async)]
[Summary("Remove a user's warning or user notes")]
[RequireContext(ContextType.Guild)]
[RequireUserPermission(GuildPermission.BanMembers)]
[RequireUserPermission(GuildPermission.KickMembers)]
public async Task forgiveUser([Summary("warning/usernote")] string type = "", [Summary("user")] string badUser = "")
{
await UpdateForgivenStatus("forgiven", type, badUser);
Expand All @@ -521,7 +521,7 @@ public async Task forgiveUser([Summary("warning/usernote")] string type = "", [S
[Command("unforgive", RunMode = RunMode.Async)]
[Summary("Unforgive a warning or user notes")]
[RequireContext(ContextType.Guild)]
[RequireUserPermission(GuildPermission.BanMembers)]
[RequireUserPermission(GuildPermission.KickMembers)]
public async Task unforgiveUser([Summary("warning/usernote")] string type = "", [Summary("user")] string badUser = "")
{
await UpdateForgivenStatus("unforgiven", type, badUser);
Expand Down

0 comments on commit 3978d74

Please sign in to comment.