Apply merge and resolve conflicts from upstream
This commit is contained in:
commit
59c9e34ea3
11 files changed
+434
-270
No files matched your search
@@ -25,7 +25,6 @@ namespace StarsiegeBot
|
||||
[Cooldown(1, 2, CooldownBucketType.Guild)]
|
||||
class DeathMessages : BaseCommandModule
|
||||
{
|
||||
private readonly Random rnd = new Random();
|
||||
private DeathMessageLines dmLines;
|
||||
private bool DeathMessagesEnabled;
|
||||
|
||||
@@ -136,7 +135,7 @@ namespace StarsiegeBot
|
||||
// if there is no target, we're going to "kill" the author.
|
||||
if (target == null)
|
||||
{
|
||||
int choice = rnd.Next(0, dmLines.Generic.Length);
|
||||
int choice = Program.rnd.Next(0, dmLines.Generic.Length);
|
||||
line = dmLines.Generic[choice];
|
||||
await ctx.RespondAsync(string.Format(line, ctx.Message.Author.Mention));
|
||||
}
|
||||
@@ -144,18 +143,18 @@ namespace StarsiegeBot
|
||||
else
|
||||
{
|
||||
// Pick a death message type at random.
|
||||
int opt = rnd.Next(1, 3);
|
||||
int opt = Program.rnd.Next(1, 3);
|
||||
// If we picked active death messages...
|
||||
if (opt == 1)
|
||||
{
|
||||
// Pick an Active death message at random, and set our output to it.
|
||||
int choice = rnd.Next(0, dmLines.Active.Length);
|
||||
int choice = Program.rnd.Next(0, dmLines.Active.Length);
|
||||
line = dmLines.Active[choice];
|
||||
}
|
||||
else if (opt == 2)
|
||||
{
|
||||
// We picked a Passive death message type. Pick the exact line at random. Set it to the output.
|
||||
int choice = rnd.Next(0, dmLines.Passive.Length);
|
||||
int choice = Program.rnd.Next(0, dmLines.Passive.Length);
|
||||
line = dmLines.Passive[choice];
|
||||
}
|
||||
// Give the selected death message to the user.
|
||||
|
||||
@@ -22,14 +22,6 @@ namespace StarsiegeBot
|
||||
[Group("functions"), Aliases("func")]
|
||||
class Functions : BaseCommandModule
|
||||
{
|
||||
private readonly DiscordColor[] colours = { DiscordColor.Aquamarine, DiscordColor.Azure, DiscordColor.Black, DiscordColor.Blue, DiscordColor.Blurple,
|
||||
DiscordColor.Brown, DiscordColor.Chartreuse, DiscordColor.CornflowerBlue, DiscordColor.Cyan, DiscordColor.DarkBlue, DiscordColor.DarkButNotBlack,
|
||||
DiscordColor.DarkGray, DiscordColor.DarkGreen, DiscordColor.DarkRed, DiscordColor.Gold, DiscordColor.Goldenrod, DiscordColor.Gray, DiscordColor.Grayple,
|
||||
DiscordColor.Green, DiscordColor.HotPink, DiscordColor.IndianRed, DiscordColor.LightGray, DiscordColor.Lilac, DiscordColor.Magenta, DiscordColor.MidnightBlue,
|
||||
DiscordColor.None, DiscordColor.NotQuiteBlack, DiscordColor.Orange, DiscordColor.PhthaloBlue, DiscordColor.PhthaloGreen, DiscordColor.Purple, DiscordColor.Red,
|
||||
DiscordColor.Rose, DiscordColor.SapGreen, DiscordColor.Sienna, DiscordColor.SpringGreen, DiscordColor.Teal, DiscordColor.Turquoise, DiscordColor.VeryDarkGray,
|
||||
DiscordColor.Violet, DiscordColor.Wheat, DiscordColor.White, DiscordColor.Yellow };
|
||||
private readonly Random rnd = new Random();
|
||||
private Dictionary<string, SSFunction> ssFunctions;
|
||||
private bool FunctionsEnabled;
|
||||
|
||||
@@ -101,7 +93,7 @@ namespace StarsiegeBot
|
||||
// set the timestamp to now... why, idk, its not really needed actually.
|
||||
embed.WithTimestamp(DateTime.Now);
|
||||
// add a random color to the left side bar of the embed.
|
||||
embed.WithColor(colours[rnd.Next(0, colours.Length)]);
|
||||
embed.WithColor(Program.colours[Program.rnd.Next(0, Program.colours.Length)]);
|
||||
// Message Description, I dont remember what it is any more, sorry!
|
||||
embed.WithDescription(outItem.description);
|
||||
// iterate over each field item, and add them to the embed.
|
||||
|
||||
@@ -65,9 +65,11 @@ namespace StarsiegeBot
|
||||
{
|
||||
return;
|
||||
}
|
||||
DiscordEmbedBuilder embed = new DiscordEmbedBuilder();
|
||||
embed.Title = "Master|Game Server Overview";
|
||||
embed.Description = "Number of Master, and Game servers. Along with number of errors.";
|
||||
DiscordEmbedBuilder embed = new DiscordEmbedBuilder
|
||||
{
|
||||
Title = "Master|Game Server Overview",
|
||||
Description = "Number of Master, and Game servers. Along with number of errors."
|
||||
};
|
||||
embed.AddField("Masters", gameData.Masters.Length.ToString(),true);
|
||||
embed.AddField("Games", gameData.Games.Length.ToString(),true);
|
||||
embed.AddField("Errors", gameData.Errors.Length.ToString(),true);
|
||||
@@ -91,8 +93,10 @@ namespace StarsiegeBot
|
||||
{
|
||||
return;
|
||||
}
|
||||
DiscordMessageBuilder msg = new DiscordMessageBuilder();
|
||||
msg.Content = "Server Listing Errors:\r\n";
|
||||
DiscordMessageBuilder msg = new DiscordMessageBuilder
|
||||
{
|
||||
Content = "Server Listing Errors:\r\n"
|
||||
};
|
||||
foreach (var item in gameData.Errors)
|
||||
{
|
||||
msg.Content += $"{item}\r\n";
|
||||
@@ -117,8 +121,10 @@ namespace StarsiegeBot
|
||||
{
|
||||
return;
|
||||
}
|
||||
DiscordMessageBuilder msg = new DiscordMessageBuilder();
|
||||
msg.Content = "```csharp\r\n";
|
||||
DiscordMessageBuilder msg = new DiscordMessageBuilder
|
||||
{
|
||||
Content = "```csharp\r\n"
|
||||
};
|
||||
int count = 0;
|
||||
foreach (var item in gameData.Masters)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,6 @@ namespace StarsiegeBot
|
||||
class QuickchatHandler : BaseCommandModule
|
||||
{
|
||||
private Dictionary<string, Quickchat> quickchats;
|
||||
private readonly Random rnd = new Random();
|
||||
private bool IsQuickChatEnabled;
|
||||
|
||||
public QuickchatHandler()
|
||||
@@ -167,7 +166,7 @@ namespace StarsiegeBot
|
||||
{
|
||||
try
|
||||
{
|
||||
id = rnd.Next(quickchats.Count);
|
||||
id = Program.rnd.Next(quickchats.Count);
|
||||
chat = quickchats[id.ToString()];
|
||||
output = $"[{id}] " + chat.text;
|
||||
}
|
||||
@@ -195,6 +194,7 @@ namespace StarsiegeBot
|
||||
}
|
||||
|
||||
[Command("search"), Aliases("s")]
|
||||
[Cooldown(1,5,CooldownBucketType.Global)]
|
||||
[Description("Searches all the [T]ext and [S]ound file names for the Search input.")]
|
||||
public async Task SearchQuickChats(CommandContext ctx, [RemainingText,Description("What to search for.")] string toSearch)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user