Removed extra spaces. Removed double \r\n across all code files.
This commit is contained in:
1 parent
91d6d1531b
commit
5bb1b43e81
19 files changed
+68
-389
No files matched your search
@@ -7,8 +7,6 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace StarsiegeBot
|
||||
{
|
||||
[Group("snapple"), Aliases("snap")]
|
||||
@@ -17,13 +15,11 @@ namespace StarsiegeBot
|
||||
private List<string> _facts;
|
||||
private bool _isEnabled;
|
||||
private static readonly string s_fileName = "Json/snapple.json";
|
||||
|
||||
public SnappleFacts()
|
||||
{
|
||||
Console.WriteLine("Snapple Commands Loaded");
|
||||
_isEnabled = Load();
|
||||
}
|
||||
|
||||
[GroupCommand, Description("Get a Snapple \"Real Fact\".")]
|
||||
public async Task Snapplefact(CommandContext ctx, [Description("[Optional] A Snapple Fact ID")] int snapId = 0)
|
||||
{
|
||||
@@ -31,8 +27,7 @@ namespace StarsiegeBot
|
||||
if (!_isEnabled)
|
||||
return;
|
||||
// trigger typing.
|
||||
await ctx.TriggerTypingAsync();
|
||||
// store our output.
|
||||
// store our output.
|
||||
string output;
|
||||
// @neo, why is this here?
|
||||
snapId--;
|
||||
@@ -49,22 +44,18 @@ namespace StarsiegeBot
|
||||
// give them what they want.
|
||||
await ctx.RespondAsync(StartEmbed(output));
|
||||
}
|
||||
|
||||
[Command("count"), Description("Get a Snapple \"Real Fact\"."), Aliases("c")]
|
||||
public async Task SnappleCount(CommandContext ctx)
|
||||
{
|
||||
if (!_isEnabled)
|
||||
return;
|
||||
await ctx.TriggerTypingAsync();
|
||||
// trigger the typing, and report how many facts are in teh bank.
|
||||
await ctx.RespondAsync(StartEmbed(_facts.Count + " facts in the Snapple \"Real Facts\" Bank"));
|
||||
}
|
||||
|
||||
[Command("load"), RequireOwner, Aliases("l")]
|
||||
public async Task Load(CommandContext ctx)
|
||||
{
|
||||
// trigger the typing.
|
||||
await ctx.TriggerTypingAsync();
|
||||
// start the response.
|
||||
DiscordEmbedBuilder embed = StartEmbed("Reloading Snapple Facts");
|
||||
// our old setting...
|
||||
@@ -79,12 +70,10 @@ namespace StarsiegeBot
|
||||
// send our results.
|
||||
await ctx.RespondAsync(embed);
|
||||
}
|
||||
|
||||
[Command("toggle"), RequireOwner, Aliases("t")]
|
||||
public async Task Enable(CommandContext ctx, [RemainingText] string isEnabled = null)
|
||||
{
|
||||
// trigger the typing.
|
||||
await ctx.TriggerTypingAsync();
|
||||
// lower case teh input.
|
||||
isEnabled = isEnabled.ToLower();
|
||||
string[] turnOn = { "on", "true", "1" };
|
||||
@@ -122,7 +111,6 @@ namespace StarsiegeBot
|
||||
}
|
||||
await ctx.RespondAsync(embed);
|
||||
}
|
||||
|
||||
private DiscordEmbedBuilder StartEmbed(string desc)
|
||||
{
|
||||
DiscordEmbedBuilder embed = new DiscordEmbedBuilder
|
||||
@@ -132,7 +120,6 @@ namespace StarsiegeBot
|
||||
};
|
||||
return embed;
|
||||
}
|
||||
|
||||
private bool Load()
|
||||
{
|
||||
bool ret;
|
||||
|
||||
Reference in new issue
Block a user