Small changes
Added stuff nodded by VS
This commit is contained in:
25
Chrobry.sln
Normal file
25
Chrobry.sln
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.7.34031.279
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Chrobry", "Chrobry.csproj", "{5F72A41D-651C-45E0-A377-5F04BC7F0E4D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{5F72A41D-651C-45E0-A377-5F04BC7F0E4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5F72A41D-651C-45E0-A377-5F04BC7F0E4D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5F72A41D-651C-45E0-A377-5F04BC7F0E4D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5F72A41D-651C-45E0-A377-5F04BC7F0E4D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {570C625E-26DC-4793-998A-10733E2600CD}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
33
Program.cs
33
Program.cs
@@ -35,7 +35,7 @@ class Program
|
||||
|
||||
// Modify user status
|
||||
await Client.CurrentUser.ModifySelfAsync(
|
||||
statusText: new Option<string>("God please someone kill me."),
|
||||
statusText: new Option<string>("?help."),
|
||||
statusType: new Option<UserStatusType>(UserStatusType.Focus)
|
||||
);
|
||||
|
||||
@@ -110,7 +110,6 @@ public class Commands : ModuleBase
|
||||
"#### List of available commands:\n\n" +
|
||||
"#### Practical Commands: \n" +
|
||||
"`?help` - Displays this command.\n" +
|
||||
"`?source` - Links to the bots source code. \n" +
|
||||
"`?credits` - Displays bot's credit.\n" +
|
||||
"`?test` - Simple test command you say test bot will response.\n" +
|
||||
"`?invite` - Send a link to invite this bot to your server! \n" +
|
||||
@@ -126,7 +125,7 @@ public class Commands : ModuleBase
|
||||
"`?dogfact` - Gives a random dogfact using the Dogfact API!. \n" +
|
||||
"`?catfact` - Gives a random Catfact using cat fact API (Currently somewhat bugged with the []). \n" +
|
||||
"`?joke` - Very simple command just gives a joke using the Joke API. \n " +
|
||||
"`?flipcoin` - a Command so easy a child could do it. \n " +
|
||||
"`?coinflip` - a Command so easy a child could do it. \n " +
|
||||
"`?fact` - Gives a random useless fact. \n " +
|
||||
"`?urban + {word}` - uses the urban dictionary to search for the word. \n" +
|
||||
"`?shitpost` - Sends a random shitpost. (The shitpost API is broken.) \n " +
|
||||
@@ -382,6 +381,34 @@ public class Commands : ModuleBase
|
||||
}
|
||||
// End of the Dice command
|
||||
|
||||
// Pick Command
|
||||
[Command("roll")]
|
||||
public async Task Roll([Remainder] string randnum = null)
|
||||
{
|
||||
if (randnum == null)
|
||||
{
|
||||
await ReplyAsync("Please specify a number to roll");
|
||||
}
|
||||
else if (int.TryParse(randnum, out int maxNumber) && maxNumber > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
var random = new Random();
|
||||
var result = random.Next(1, maxNumber + 1);
|
||||
await ReplyAsync($"You rolled a {result}!");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await ReplyAsync("An error occurred while rolling the dice.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReplyAsync("Please pick a valid number.");
|
||||
}
|
||||
}
|
||||
// End of the pick command
|
||||
|
||||
// Very simple say command.
|
||||
private List<string> blacklist = new List<string>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user