Added in Description tags to a bunch of things.

This commit is contained in:
Christopher Darnell committed 2021-04-28 14:16:38 -07:00
1 parent c35e0f71f7
commit 08091e7456
13 files changed
+58 -25

No files matched your search

+2 -1
View File
@@ -55,6 +55,7 @@ namespace StarsiegeBot
}
[Command("load")]
[RequireOwner]
public async Task LoadDeathMessages(CommandContext ctx)
{
await ctx.TriggerTypingAsync();
@@ -263,7 +264,7 @@ namespace StarsiegeBot
// Open the file to upload.
FileStream sound = new FileStream($"deathmessages.cs", FileMode.Open);
// Tell DSharp that we want to upload this file.
msg.WithFile(sound);
msg.WithFile("deathmessages.cs", sound);
// Add some content so its not a blank file.
msg.Content ="Here is your request for a death message script.";
// send that message.
+1 -1
View File
@@ -213,7 +213,7 @@ namespace StarsiegeBot
}
return $"Name: {name} || Title: {title} || Desc: {description} || Fields: {fs}";
return $"Name: {name} || Title: {title} || Desc: {description} || Fields: {{{fs}}}";
}
}
public class Fields
+17 -7
View File
@@ -21,12 +21,14 @@ using System.Net;
namespace StarsiegeBot
{
[Group("servers")]
[Description("Gives various reports on the game or master servers.")]
class GameInfo : BaseCommandModule
{
private WebServerItems gameData;
public GameInfo()
{
Update();
Console.WriteLine("Starsiege Game Info Commands Loaded");
}
private void Update()
{
@@ -63,11 +65,17 @@ namespace StarsiegeBot
{
return;
}
DiscordMessageBuilder msg = new DiscordMessageBuilder();
msg.Content = $"";
DiscordEmbedBuilder embed = new DiscordEmbedBuilder();
embed.Title = "Master|Game Server Overview";
embed.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);
await ctx.RespondAsync(embed);
}
[Command("Errors")]
[Command("Errors"), Aliases("e")]
[Description("Lists all the errors from the server listing.")]
public async Task ErrorsServer(CommandContext ctx)
{
await ctx.TriggerTypingAsync();
@@ -92,7 +100,8 @@ namespace StarsiegeBot
await ctx.RespondAsync(msg);
}
[Command("Masters")]
[Command("Masters"), Aliases("m")]
[Description("Gives all the master servers as a script to be improted into `master.cs`.")]
public async Task MasterServers (CommandContext ctx)
{
await ctx.TriggerTypingAsync();
@@ -120,8 +129,9 @@ namespace StarsiegeBot
await ctx.RespondAsync(msg);
}
[Command("games")]
public async Task GameServers(CommandContext ctx, int playerCount = 1)
[Command("games"), Aliases("g")]
[Description("Currently: Lists games that have been started (Player dropped in). End Result: Lists all games that have a player in the server (either dropped in or not)")]
public async Task GameServers(CommandContext ctx, [Description("Number of players you want to check for. Game servers will need at least this meaning or more to be listed.")]int playerCount = 1)
{
await ctx.TriggerTypingAsync();
Update();
@@ -152,7 +162,7 @@ namespace StarsiegeBot
}
if (count == 0)
{
msg.Content = "No active servers. We're sorry";
msg.Content = "No servers matching your requirements. We're sorry";
}
await ctx.RespondAsync(msg);
}
+5 -2
View File
@@ -52,6 +52,7 @@ namespace StarsiegeBot
}
[Command("load"), RequireOwner]
[Description("[Onwer Only] Reloads the QuickChat files. If they exist. Also enables QC's if file is found.")]
public async Task LoadQuickChats(CommandContext ctx)
{
await ctx.TriggerTypingAsync();
@@ -185,7 +186,8 @@ namespace StarsiegeBot
}
[Command("search"), Aliases("s")]
public async Task SearchQuickChats(CommandContext ctx, [RemainingText] string toSearch)
[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)
{
await ctx.TriggerTypingAsync();
// If we're disabled, let them know. And exit out.
@@ -228,7 +230,7 @@ namespace StarsiegeBot
{
msg.Content = "Here are your results.";
FileStream upload = new FileStream($"tempQC.txt", FileMode.Open);
msg.WithFile(upload);
msg.WithFile("tempQC.txt", upload);
await ctx.RespondAsync(msg);
upload.Close();
}
@@ -236,6 +238,7 @@ namespace StarsiegeBot
[Command("toggle"), Aliases("t")]
[RequireOwner]
[Description("[Onwer only] Enables or disables, or checks status of QuickChats.")]
public async Task ToggleQC (CommandContext ctx, [RemainingText] string isEnabled = null)
{
await ctx.TriggerTypingAsync();