Added in Description tags to a bunch of things.
This commit is contained in:
1 parent
c35e0f71f7
commit
08091e7456
13 files changed
+58
-25
No files matched your search
@@ -72,6 +72,7 @@ namespace StarsiegeBot
|
||||
}
|
||||
}
|
||||
[GroupCommand]
|
||||
[Description("Work in progress. Does nothing yet.")]
|
||||
public async Task BaseItem(CommandContext ctx)
|
||||
{
|
||||
await ctx.TriggerTypingAsync();
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace StarsiegeBot
|
||||
}
|
||||
|
||||
[Command("add")]
|
||||
public async Task AddGroup(CommandContext ctx, [RemainingText] string groupName)
|
||||
public async Task AddGroup(CommandContext ctx, [RemainingText, Description("Group to create.")] string groupName)
|
||||
{
|
||||
await ctx.TriggerTypingAsync();
|
||||
string gId = ctx.Guild.Id.ToString();
|
||||
@@ -67,7 +67,7 @@ namespace StarsiegeBot
|
||||
|
||||
// TODO: Delete all roles or assign new group?
|
||||
[Command("delete")]
|
||||
public async Task RemoveGroup(CommandContext ctx, [RemainingText] string groupName)
|
||||
public async Task RemoveGroup(CommandContext ctx, [RemainingText, Description("Group to delete")] string groupName)
|
||||
{
|
||||
await ctx.TriggerTypingAsync();
|
||||
string gId = ctx.Guild.Id.ToString();
|
||||
@@ -83,6 +83,7 @@ namespace StarsiegeBot
|
||||
}
|
||||
|
||||
[Command("edit")]
|
||||
[Description("This is under construction. Does nothing yet.")]
|
||||
public async Task EditGroup(CommandContext ctx, [RemainingText] string groupInfo)
|
||||
{
|
||||
await ctx.TriggerTypingAsync();
|
||||
@@ -24,6 +24,7 @@ using System.Threading;
|
||||
namespace StarsiegeBot
|
||||
{
|
||||
[Group("GroupRole")]
|
||||
[Description("Work in progress. Does nothing yet.")]
|
||||
[RequireGuild, RequirePermissions(Permissions.ManageRoles)]
|
||||
class GroupRoleManagement : BotSettings
|
||||
{
|
||||
@@ -39,7 +40,8 @@ namespace StarsiegeBot
|
||||
}
|
||||
|
||||
[Command("add")]
|
||||
public async Task AddSelfRole(CommandContext ctx, DiscordRole role, int price = 0, string group = null)
|
||||
[Description("Work in progress. Does nothing yet.")]
|
||||
public async Task AddSelfRole(CommandContext ctx, [Description("The role to add.")]DiscordRole role, [Description("The price of the role for buyable roles. 0 for no cost. Free free to leave blank if not using Buyable roles.")]int price = 0, [Description("What group to put the role in. If not using groups, you can leave blank.")]string group = null)
|
||||
{
|
||||
await ctx.TriggerTypingAsync();
|
||||
if (price == -1)
|
||||
@@ -49,12 +51,14 @@ namespace StarsiegeBot
|
||||
}
|
||||
|
||||
[Command("delete")]
|
||||
public async Task DeleteSelfRole(CommandContext ctx, DiscordRole role, string group = null)
|
||||
[Description("Work in progress. Does nothing yet.")]
|
||||
public async Task DeleteSelfRole(CommandContext ctx, [Description("The role to delete.")] DiscordRole role, [Description("The group to remove the role from. If left blank, will remove from all groups.")]string group = null)
|
||||
{
|
||||
await ctx.TriggerTypingAsync();
|
||||
}
|
||||
|
||||
[Command("Edit")]
|
||||
[Description("Work in progress. Does nothing yet.")]
|
||||
public async Task EditRole(CommandContext ctx, DiscordRole role, int newPrice = 0, [RemainingText] string newGroup = null)
|
||||
{
|
||||
await ctx.TriggerTypingAsync();
|
||||
@@ -25,6 +25,7 @@ namespace StarsiegeBot
|
||||
{
|
||||
[Group("Level")]
|
||||
[RequireGuild, RequirePermissions(Permissions.ManageRoles)]
|
||||
[Description("Work in progress. Does nothing yet.")]
|
||||
class LevelManagement : BotSettings
|
||||
{
|
||||
public LevelManagement()
|
||||
@@ -33,12 +34,14 @@ namespace StarsiegeBot
|
||||
}
|
||||
|
||||
[GroupCommand]
|
||||
[Description("Work in progress. Does nothing yet.")]
|
||||
public async Task ListLevels(CommandContext ctx)
|
||||
{
|
||||
await ctx.TriggerTypingAsync();
|
||||
}
|
||||
|
||||
[Command("AddLevel"), Aliases("al")]
|
||||
[Description("Work in progress. Does nothing yet.")]
|
||||
public async Task AddLevel(CommandContext ctx, int newLevelGroup)
|
||||
{
|
||||
await ctx.TriggerTypingAsync();
|
||||
@@ -46,12 +49,14 @@ namespace StarsiegeBot
|
||||
|
||||
|
||||
[Command("DeleteLevel"), Aliases("dl")]
|
||||
[Description("Work in progress. Does nothing yet.")]
|
||||
public async Task DeleteLevel(CommandContext ctx, int oldLevelGroup)
|
||||
{
|
||||
await ctx.TriggerTypingAsync();
|
||||
}
|
||||
|
||||
[Command("edit")]
|
||||
[Description("Work in progress. Does nothing yet.")]
|
||||
public async Task EditLevel (CommandContext ctx, int oldLeve, int newLevel)
|
||||
{
|
||||
await ctx.TriggerTypingAsync();
|
||||
@@ -33,28 +33,31 @@ namespace StarsiegeBot
|
||||
}
|
||||
|
||||
[Command("edit")]
|
||||
[Description("Work in progress. Does nothing yet.")]
|
||||
public async Task EditRole(CommandContext ctx, int oldLevel, int newLevel, DiscordRole role)
|
||||
{
|
||||
await ctx.TriggerTypingAsync();
|
||||
}
|
||||
|
||||
[Command("edit")]
|
||||
[Description("Work in progress. Does nothing yet.")]
|
||||
public async Task EditRole(CommandContext ctx, int newLevel, [RemainingText] string role)
|
||||
{
|
||||
await ctx.TriggerTypingAsync();
|
||||
}
|
||||
|
||||
[Command("remove")]
|
||||
[Description("Work in progress. Does nothing yet.")]
|
||||
public async Task RemoveRole(CommandContext ctx, DiscordRole role)
|
||||
{
|
||||
await ctx.TriggerTypingAsync();
|
||||
}
|
||||
|
||||
[Command("remove")]
|
||||
[Description("Work in progress. Does nothing yet.")]
|
||||
public async Task RemoveRole(CommandContext ctx, [RemainingText] string roleName)
|
||||
{
|
||||
await ctx.TriggerTypingAsync();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -33,24 +33,28 @@ namespace StarsiegeBot
|
||||
}
|
||||
|
||||
[Command("join")]
|
||||
[Description("Work in progress. Does nothing yet.")]
|
||||
public async Task JoinSelfRole(CommandContext ctx, DiscordRole role)
|
||||
{
|
||||
await ctx.TriggerTypingAsync();
|
||||
}
|
||||
|
||||
[Command("join")]
|
||||
[Description("Work in progress. Does nothing yet.")]
|
||||
public async Task JoinSelfRole(CommandContext ctx, [RemainingText] string role)
|
||||
{
|
||||
await ctx.TriggerTypingAsync();
|
||||
}
|
||||
|
||||
[Command("leave")]
|
||||
[Description("Work in progress. Does nothing yet.")]
|
||||
public async Task LeaveSelfRole(CommandContext ctx, DiscordRole role)
|
||||
{
|
||||
await ctx.TriggerTypingAsync();
|
||||
}
|
||||
|
||||
[Command("leave")]
|
||||
[Description("Work in progress. Does nothing yet.")]
|
||||
public async Task LeaveSelfRole(CommandContext ctx, [RemainingText] string role)
|
||||
{
|
||||
await ctx.TriggerTypingAsync();
|
||||
@@ -115,14 +115,16 @@ namespace StarsiegeBot
|
||||
|
||||
// up next, let's register our commands
|
||||
this.Commands.RegisterCommands<Commands>();
|
||||
// this.Commands.RegisterCommands<SnappleFacts>();
|
||||
this.Commands.RegisterCommands<BotSettings>(); // Main Folder. Test Items.
|
||||
this.Commands.RegisterCommands<RoleManagement>(); // Main Folder. Test Items.
|
||||
this.Commands.RegisterCommands<LevelRoleManagement>(); // Main Folder. Test Items.
|
||||
this.Commands.RegisterCommands<GroupRoleManagement>(); // Main Folder. Test Items.
|
||||
this.Commands.RegisterCommands<LevelManagement>(); // Main Folder. Test Items.
|
||||
this.Commands.RegisterCommands<GroupManagement>(); // Main Folder. Test Items.
|
||||
this.Commands.RegisterCommands<WelcomeMessage>(); // Main Folder. Test Items.
|
||||
this.Commands.RegisterCommands<PrefixManagement>();
|
||||
// this.Commands.RegisterCommands<SnappleFacts>();
|
||||
// this.Commands.RegisterCommands<RoleManagement>(); // Main Folder. Test Items.
|
||||
// this.Commands.RegisterCommands<LevelRoleManagement>(); // Main Folder. Test Items.
|
||||
// this.Commands.RegisterCommands<GroupRoleManagement>(); // Main Folder. Test Items.
|
||||
// this.Commands.RegisterCommands<LevelManagement>(); // Main Folder. Test Items.
|
||||
// this.Commands.RegisterCommands<GroupManagement>(); // Main Folder. Test Items.
|
||||
// this.Commands.RegisterCommands<StarsiegeCommands>();
|
||||
|
||||
// All these commands are in the STARSIEGE folder.
|
||||
//if (BotName.Contains("ssp"))
|
||||
@@ -130,7 +132,6 @@ namespace StarsiegeBot
|
||||
this.Commands.RegisterCommands<Quickchat>();
|
||||
this.Commands.RegisterCommands<Functions>();
|
||||
this.Commands.RegisterCommands<DeathMessages>();
|
||||
this.Commands.RegisterCommands<StarsiegeCommands>();
|
||||
this.Commands.RegisterCommands<GameInfo>();
|
||||
//}
|
||||
Task thisTimerf = StartTimer(new CancellationToken());
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace StarsiegeBot
|
||||
private Random rnd = new Random();
|
||||
|
||||
[Command("snapple"), Description("Get a Snapple \"Real Fact\".")]
|
||||
public async Task Snapplefact(CommandContext ctx, int snapId = -1)
|
||||
public async Task Snapplefact(CommandContext ctx, [Description("[Optional] A Snapple Fact ID")]int snapId = -1)
|
||||
{
|
||||
if (snapId == -1)
|
||||
{
|
||||
@@ -36,6 +36,7 @@ namespace StarsiegeBot
|
||||
|
||||
public SnappleFacts()
|
||||
{
|
||||
Console.WriteLine("Snapple Commands Loaded");
|
||||
this.facts = new string[] { "Animals that lay eggs don't have belly buttons.",
|
||||
"Beavers can hold their breath for 45 minutes under water.",
|
||||
"Slugs have four noses.",
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Unicorn\" />
|
||||
<Folder Include="Phoenix\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in new issue
Block a user