Skip to content

Commit

Permalink
Removed the Voting Links handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
MythicalCuddles committed Oct 15, 2019
1 parent 8c0b857 commit 3b2a607
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 137 deletions.
52 changes: 0 additions & 52 deletions DiscordBot/Modules/Admin/AdminModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
using DiscordBot.Common;
using DiscordBot.Extensions;
using DiscordBot.Objects;
using DiscordBot.Other;

namespace DiscordBot.Modules.Admin
{
Expand Down Expand Up @@ -297,56 +296,5 @@ public async Task DenyQuote(int quoteId)
await ReplyAsync("", false, eb.Build());
await Configuration.Load().LogChannelId.GetTextChannel().SendMessageAsync("", false, eb.Build());
}

[Command("addvotelink"), Summary("Add a voting link to the list.")]
public async Task AddVoteLink([Remainder]string link)
{
VoteLinkHandler.AddAndUpdateLinks(link);

EmbedBuilder eb = new EmbedBuilder()
.WithDescription(Context.User.Mention + " Link Added")
.WithColor(33, 210, 47);

await ReplyAsync("", false, eb.Build());
}

[Command("listvotelinks"), Summary("Sends a list of all the voting links.")]
public async Task ListVotingLinks()
{
StringBuilder sb = new StringBuilder()
.Append("**Voting Link List**\n```");

for (int i = 0; i < VoteLinkHandler.VoteLinkList.Count; i++)
{
sb.Append(i + ": " + VoteLinkHandler.VoteLinkList[i] + "\n");
}

sb.Append("```");

await ReplyAsync(sb.ToString());
}

[Command("editvotelink"), Summary("Edit a voting link from the list.")]
public async Task EditVotingLink(int linkId, [Remainder]string link)
{
string oldLink = VoteLinkHandler.VoteLinkList[linkId];
VoteLinkHandler.UpdateLink(linkId, link);
await ReplyAsync(Context.User.Mention + " updated vote link id: " + linkId + "\nOld link: `" + oldLink + "`\nUpdated: `" + link + "`");
}

[Command("deletevotelink"), Summary("Delete a voting link from the list. Make sure to `$listvotelinks` to get the ID for the link being removed!")]
public async Task RemoveVotingLink(int linkId)
{
string link = VoteLinkHandler.VoteLinkList[linkId];
VoteLinkHandler.RemoveAndUpdateLinks(linkId);

EmbedBuilder eb = new EmbedBuilder()
.WithDescription(Context.User.Mention + " Link Removed\nLink: " + link)
.WithColor(210, 47, 33);

await ReplyAsync("", false, eb.Build());

await ListVotingLinks().ConfigureAwait(false);
}
}
}
17 changes: 0 additions & 17 deletions DiscordBot/Modules/Public/InfoModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using DiscordBot.Common.Preconditions;
using DiscordBot.Common;
using DiscordBot.Objects;
using DiscordBot.Other;

namespace DiscordBot.Modules.Public
{
Expand Down Expand Up @@ -89,22 +88,6 @@ public async Task PostEmailAddress()
{
await ReplyAsync("Send complaints to `MogiiCraft.@pizza@gmail.com`");
}

[Command("vote"), Summary("Sends links to the voting websites for Minecraft.")]
public async Task SendVotingLinks()
{
StringBuilder sb = new StringBuilder()
.Append("**Vote Links**\n" + Context.User.Mention + " use the following links to vote and support the server. You'll be given some diamonds in-game to say thanks :D\n");

foreach (var link in VoteLinkHandler.VoteLinkList)
{
sb.Append("<" + link + ">\n");
}

sb.Append("");

await ReplyAsync(sb.ToString());
}
}
}
}
66 changes: 0 additions & 66 deletions DiscordBot/Other/VoteLinkHandler.cs

This file was deleted.

2 changes: 0 additions & 2 deletions DiscordBot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using DiscordBot.Common;
using DiscordBot.Database;
using DiscordBot.Extensions;
using DiscordBot.Other;
using MelissaNet;
using MelissaNet.Modules;

Expand Down Expand Up @@ -60,7 +59,6 @@ private static async void StartBot(string[] args) // Startup Method.
// Check if application configurations exist.
Configuration.EnsureExists();
StringConfiguration.EnsureExists();
VoteLinkHandler.EnsureExists();

// Verify Settings
bool invalidToken = false, invalidDbSettings = false;
Expand Down

0 comments on commit 3b2a607

Please sign in to comment.