Skip to content

Commit

Permalink
Added toggleexpreactawarding and toggleexpreactpostawarding to editco…
Browse files Browse the repository at this point in the history
…nfig
  • Loading branch information
MythicalCuddles committed Jan 18, 2020
1 parent 68e0ec5 commit 89251d1
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions DiscordBot/Modules/Owner/ConfigModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ await ReplyAsync("**Syntax:** " +
"[17] toggleshowallawards\n" +
"[18] awardsiconurl [link]\n" +
"[19] toggleawardingexpmention\n" +
"[20] toggleexpreactawarding\n" +
"[21] toggleexpreactpostawarding\n" +
"```");

AdminLog.Log(Context.User.Id, Context.Message.Content, Context.Guild.Id);
Expand Down Expand Up @@ -274,7 +276,34 @@ public async Task ToggleEXPAwarding()

await Configuration.Load().LogChannelId.GetTextChannel().SendMessageAsync("EXP awarding has been toggled by " + Context.User.Mention + " (enabled: " + Configuration.Load().AwardingEXPEnabled.ToYesNo() + ")");
}

[Command("toggleexpreactawarding"), Summary("Toggles if users receive EXP.")]
public async Task ToggleEXPAwardingReactions()
{
Configuration.UpdateConfiguration(awardingEXPReactionEnabled: !Configuration.Load().AwardingEXPReactionEnabled);
AdminLog.Log(Context.User.Id, Context.Message.Content, Context.Guild.Id);

await Configuration.Load().LogChannelId.GetTextChannel().SendMessageAsync("EXP awarding via reactions has been toggled by " + Context.User.Mention + " (enabled: " + Configuration.Load().AwardingEXPReactionEnabled.ToYesNo() + ")");
}

[Command("toggleexpreactpostawarding"), Summary("Toggles if users receive EXP.")]
public async Task ToggleEXPAwardingReactionsPoster()
{
Configuration.UpdateConfiguration(awardingEXPReactPostEnabled: !Configuration.Load().AwardingEXPReactPostEnabled);
AdminLog.Log(Context.User.Id, Context.Message.Content, Context.Guild.Id);

await Configuration.Load().LogChannelId.GetTextChannel().SendMessageAsync("EXP awarding has been toggled by " + Context.User.Mention + " (enabled: " + Configuration.Load().AwardingEXPReactPostEnabled.ToYesNo() + ")");
}

[Command("toggleawardingexpmention"), Summary("Toggles if users get mentioned when they level up.")]
public async Task ToggleAwardingEXPMention()
{
Configuration.UpdateConfiguration(awardingEXPMentionUser: !Configuration.Load().AwardingEXPMentionUser);
AdminLog.Log(Context.User.Id, Context.Message.Content, Context.Guild.Id);

await Configuration.Load().LogChannelId.GetTextChannel().SendMessageAsync("AwardingEXPMentionUser has been toggled by " + Context.User.Mention + " (enabled: " + Configuration.Load().AwardingEXPMentionUser.ToYesNo() + ")");
}

[Command("leaderboardtrophyurl"), Summary("")]
public async Task SetLeaderboardTrophyUrl(string link)
{
Expand Down Expand Up @@ -313,15 +342,6 @@ public async Task SetAwardsIconUrl(string link)

await Configuration.Load().LogChannelId.GetTextChannel().SendMessageAsync(Context.User.Mention + " has updated the Awards Icon URL to: " + link + " (was: " + oldValue + ")");
}

[Command("toggleawardingexpmention"), Summary("Toggles if users get mentioned when they level up.")]
public async Task ToggleAwardingEXPMention()
{
Configuration.UpdateConfiguration(awardingEXPMentionUser: !Configuration.Load().AwardingEXPMentionUser);
AdminLog.Log(Context.User.Id, Context.Message.Content, Context.Guild.Id);

await Configuration.Load().LogChannelId.GetTextChannel().SendMessageAsync("AwardingEXPMentionUser has been toggled by " + Context.User.Mention + " (enabled: " + Configuration.Load().AwardingEXPMentionUser.ToYesNo() + ")");
}
}

[Group("editdatabase")]
Expand Down

0 comments on commit 89251d1

Please sign in to comment.