reverted back fully now!
This commit is contained in:
110
Program.cs
110
Program.cs
@@ -109,6 +109,7 @@ public class Commands : ModuleBase
|
|||||||
var helpMessage =
|
var helpMessage =
|
||||||
"#### List of available commands:\n\n" +
|
"#### List of available commands:\n\n" +
|
||||||
"#### Practical Commands: \n" +
|
"#### Practical Commands: \n" +
|
||||||
|
"`?video` - Sends a list of all aviable videos\n" +
|
||||||
"`?help` - Displays this command.\n" +
|
"`?help` - Displays this command.\n" +
|
||||||
"`?credits` - Displays bot's credit.\n" +
|
"`?credits` - Displays bot's credit.\n" +
|
||||||
"`?test` - Simple test command you say test bot will response.\n" +
|
"`?test` - Simple test command you say test bot will response.\n" +
|
||||||
@@ -134,11 +135,27 @@ public class Commands : ModuleBase
|
|||||||
"`?advice` - Gives the user a life Advice \n " +
|
"`?advice` - Gives the user a life Advice \n " +
|
||||||
"`?quote` - Gives a random quote using yet another API. \n " +
|
"`?quote` - Gives a random quote using yet another API. \n " +
|
||||||
"`?gif {term}` - Allows the user to search for gifs using giphy (Beta) \n" +
|
"`?gif {term}` - Allows the user to search for gifs using giphy (Beta) \n" +
|
||||||
"`?avatar` - Sends the user Avatar (Beta) \n ";
|
"`?pun` - Gives user a simple pun. \n" +
|
||||||
|
"`?avatar` - Sends the user Avatar (Beta) \n " +
|
||||||
|
"#### This bot is far from ready so please don't be too harash on it :01H4RPMABMK4GPXH4QBKAKVJF9:";
|
||||||
await ReplyAsync(helpMessage);
|
await ReplyAsync(helpMessage);
|
||||||
}
|
}
|
||||||
// End of the Help command.
|
// End of the Help command.
|
||||||
|
|
||||||
|
// Begning of Video command
|
||||||
|
[Command("video")]
|
||||||
|
public async Task Video()
|
||||||
|
{
|
||||||
|
var video = "Here is a list of all aviable videos! \n" +
|
||||||
|
"`?ihnk` - Sends a I have no knwoledge about any of this video. \n" +
|
||||||
|
//"`?s` - Sends . \n" +
|
||||||
|
//"`?s` - Sends . \n" +
|
||||||
|
//"`?s` - Sends . \n" +
|
||||||
|
"`?scary` - Sends the oh oh scary oh oh shiver me timbers video \n";
|
||||||
|
await ReplyAsync(video);
|
||||||
|
}
|
||||||
|
// End of Video command
|
||||||
|
|
||||||
// Mod Help command
|
// Mod Help command
|
||||||
[Command("mod-help")]
|
[Command("mod-help")]
|
||||||
public async Task ModHelp()
|
public async Task ModHelp()
|
||||||
@@ -147,7 +164,8 @@ public class Commands : ModuleBase
|
|||||||
"## List Of Available mod commands. \n" +
|
"## List Of Available mod commands. \n" +
|
||||||
"`?kick {Mention}` - Kicks the user \n" +
|
"`?kick {Mention}` - Kicks the user \n" +
|
||||||
"`?ban {mentions}` - Bans the User \n" +
|
"`?ban {mentions}` - Bans the User \n" +
|
||||||
"`?unban {mention}` - Unbans the user. \n";
|
"`?unban {mention}` - Unbans the user. \n" +
|
||||||
|
"### I am Currently working on adding more usefull command so be patient! \n";
|
||||||
|
|
||||||
await ReplyAsync(helpMessage);
|
await ReplyAsync(helpMessage);
|
||||||
}
|
}
|
||||||
@@ -202,6 +220,8 @@ public class Commands : ModuleBase
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
// Sends a messege in the server
|
||||||
|
await ReplyAsync("You should recive DMs now.");
|
||||||
// Send initial message
|
// Send initial message
|
||||||
await DM.SendMessageAsync("DMs work if you received this message.");
|
await DM.SendMessageAsync("DMs work if you received this message.");
|
||||||
await DM.SendMessageAsync("-----");
|
await DM.SendMessageAsync("-----");
|
||||||
@@ -291,6 +311,14 @@ public class Commands : ModuleBase
|
|||||||
|
|
||||||
// Fun commands:
|
// Fun commands:
|
||||||
|
|
||||||
|
// L Command
|
||||||
|
[Command("l")]
|
||||||
|
public async Task LCommand()
|
||||||
|
{
|
||||||
|
await ReplyAsync("L");
|
||||||
|
}
|
||||||
|
// End of L command
|
||||||
|
|
||||||
// Gif command
|
// Gif command
|
||||||
[Command("gif")]
|
[Command("gif")]
|
||||||
public async Task GifCommand([Remainder] string keyword)
|
public async Task GifCommand([Remainder] string keyword)
|
||||||
@@ -548,9 +576,9 @@ public class Commands : ModuleBase
|
|||||||
string factJson = await response.Content.ReadAsStringAsync();
|
string factJson = await response.Content.ReadAsStringAsync();
|
||||||
JObject factObject = JObject.Parse(factJson);
|
JObject factObject = JObject.Parse(factJson);
|
||||||
|
|
||||||
if (factObject["data"] != null)
|
if (factObject["data"] is JArray dataArray && dataArray.Count > 0)
|
||||||
{
|
{
|
||||||
string fact = factObject["data"].ToString();
|
string fact = dataArray[0].ToString();
|
||||||
await ReplyAsync(fact);
|
await ReplyAsync(fact);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -569,8 +597,50 @@ public class Commands : ModuleBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// End of the Cat fact command
|
// End of the Cat fact command
|
||||||
|
|
||||||
|
// Pun command
|
||||||
|
[Command("pun")]
|
||||||
|
public async Task Pun()
|
||||||
|
{
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string apiUrl = "https://v2.jokeapi.dev/joke/Pun";
|
||||||
|
HttpResponseMessage response = await client.GetAsync(apiUrl);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string jokeJson = await response.Content.ReadAsStringAsync();
|
||||||
|
JObject jokeObject = JObject.Parse(jokeJson);
|
||||||
|
|
||||||
|
string setup = jokeObject["setup"]?.ToString();
|
||||||
|
string punchline = jokeObject["delivery"]?.ToString();
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(setup) && !string.IsNullOrEmpty(punchline))
|
||||||
|
{
|
||||||
|
await ReplyAsync($"**{setup}**\n*{punchline}*");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await ReplyAsync("Sorry, I couldn't fetch a pun at the moment. Please try again later.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await ReplyAsync("Sorry, I couldn't fetch a pun at the moment. Please try again later.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
await ReplyAsync($"An error occurred: {ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// End of the Pun command
|
||||||
|
|
||||||
// Joke command
|
// Joke command
|
||||||
[Command("joke")]
|
[Command("joke")]
|
||||||
public async Task Joke()
|
public async Task Joke()
|
||||||
@@ -910,6 +980,7 @@ public class Commands : ModuleBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
private RevoltClient Client;
|
private RevoltClient Client;
|
||||||
|
// End of styff nedded to make those command work.
|
||||||
|
|
||||||
// Stats command
|
// Stats command
|
||||||
[Command("stats")]
|
[Command("stats")]
|
||||||
@@ -928,6 +999,7 @@ public class Commands : ModuleBase
|
|||||||
await ReplyAsync($"An error occurred: {ex.Message}");
|
await ReplyAsync($"An error occurred: {ex.Message}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// End of the stats command
|
||||||
|
|
||||||
// Ban Command
|
// Ban Command
|
||||||
[Command("ban")]
|
[Command("ban")]
|
||||||
@@ -944,6 +1016,7 @@ public class Commands : ModuleBase
|
|||||||
await ReplyAsync("### ERROR\nInvalid Mention or Bot Permissions.");
|
await ReplyAsync("### ERROR\nInvalid Mention or Bot Permissions.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// End of the Ban command
|
||||||
|
|
||||||
// Unban Command
|
// Unban Command
|
||||||
[Command("unban")]
|
[Command("unban")]
|
||||||
@@ -960,6 +1033,7 @@ public class Commands : ModuleBase
|
|||||||
await ReplyAsync("### ERROR\nInvalid Mention or Bot Permissions.");
|
await ReplyAsync("### ERROR\nInvalid Mention or Bot Permissions.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// End of the UnBan command
|
||||||
|
|
||||||
// Kick Command
|
// Kick Command
|
||||||
[Command("kick")]
|
[Command("kick")]
|
||||||
@@ -976,6 +1050,7 @@ public class Commands : ModuleBase
|
|||||||
await ReplyAsync("### ERROR\nInvalid Mention or Bot Permissions.");
|
await ReplyAsync("### ERROR\nInvalid Mention or Bot Permissions.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// End of the Kick command
|
||||||
|
|
||||||
// End of mod commands
|
// End of mod commands
|
||||||
|
|
||||||
@@ -1032,6 +1107,14 @@ public class Commands : ModuleBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cL Command
|
||||||
|
[Command("cl")]
|
||||||
|
public async Task LTemog()
|
||||||
|
{
|
||||||
|
await ReplyAsync("Common <@01H5K1PW0B2NGGWFRGHZVBCZ0S> L");
|
||||||
|
}
|
||||||
|
// End of cL command
|
||||||
|
|
||||||
// Hentai command.
|
// Hentai command.
|
||||||
[Command("hentai")]
|
[Command("hentai")]
|
||||||
public async Task Hentai()
|
public async Task Hentai()
|
||||||
@@ -1069,5 +1152,24 @@ public class Commands : ModuleBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// End of NSFW commands
|
// End of NSFW commands
|
||||||
|
|
||||||
|
// Begning of Videos and gif commands!
|
||||||
|
|
||||||
|
// I have no knowlege
|
||||||
|
[Command("ihnk")]
|
||||||
|
public async Task IHave()
|
||||||
|
{
|
||||||
|
await ReplyAsync("https://cdn.purplebored.pl/uploads/y2mate.com%20-%20I%20have%20no%20knowledge%20of%20any%20of%20this%20ThIs%20iS%20sO%20bIzZaRe_480p.mp4");
|
||||||
|
}
|
||||||
|
// end of ihnk
|
||||||
|
|
||||||
|
// Begning of scary
|
||||||
|
[Command("Scary")]
|
||||||
|
public async Task Scary()
|
||||||
|
{
|
||||||
|
await ReplyAsync("https://cdn.purplebored.pl/uploads/y2mate.com%20-%20oh%20oh%20scary%20oh%20oh%20shiver%20me%20timbers_360p.mp4");
|
||||||
|
}
|
||||||
|
// End of scary
|
||||||
|
|
||||||
// End of the Bot
|
// End of the Bot
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user