reverted back fully now!

This commit is contained in:
Purplebored
2023-09-26 18:15:47 +02:00
parent 7c95c59aff
commit a927ab62ac

View File

@@ -109,6 +109,7 @@ public class Commands : ModuleBase
var helpMessage =
"#### List of available commands:\n\n" +
"#### Practical Commands: \n" +
"`?video` - Sends a list of all aviable videos\n" +
"`?help` - Displays this command.\n" +
"`?credits` - Displays bot's credit.\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 " +
"`?quote` - Gives a random quote using yet another API. \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);
}
// 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
[Command("mod-help")]
public async Task ModHelp()
@@ -147,7 +164,8 @@ public class Commands : ModuleBase
"## List Of Available mod commands. \n" +
"`?kick {Mention}` - Kicks 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);
}
@@ -202,6 +220,8 @@ public class Commands : ModuleBase
try
{
// Sends a messege in the server
await ReplyAsync("You should recive DMs now.");
// Send initial message
await DM.SendMessageAsync("DMs work if you received this message.");
await DM.SendMessageAsync("-----");
@@ -291,6 +311,14 @@ public class Commands : ModuleBase
// Fun commands:
// L Command
[Command("l")]
public async Task LCommand()
{
await ReplyAsync("L");
}
// End of L command
// Gif command
[Command("gif")]
public async Task GifCommand([Remainder] string keyword)
@@ -548,9 +576,9 @@ public class Commands : ModuleBase
string factJson = await response.Content.ReadAsStringAsync();
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);
}
else
@@ -569,8 +597,50 @@ public class Commands : ModuleBase
}
}
}
// 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
[Command("joke")]
public async Task Joke()
@@ -910,6 +980,7 @@ public class Commands : ModuleBase
}
private RevoltClient Client;
// End of styff nedded to make those command work.
// Stats command
[Command("stats")]
@@ -928,6 +999,7 @@ public class Commands : ModuleBase
await ReplyAsync($"An error occurred: {ex.Message}");
}
}
// End of the stats command
// Ban Command
[Command("ban")]
@@ -944,6 +1016,7 @@ public class Commands : ModuleBase
await ReplyAsync("### ERROR\nInvalid Mention or Bot Permissions.");
}
}
// End of the Ban command
// Unban Command
[Command("unban")]
@@ -960,6 +1033,7 @@ public class Commands : ModuleBase
await ReplyAsync("### ERROR\nInvalid Mention or Bot Permissions.");
}
}
// End of the UnBan command
// Kick Command
[Command("kick")]
@@ -976,6 +1050,7 @@ public class Commands : ModuleBase
await ReplyAsync("### ERROR\nInvalid Mention or Bot Permissions.");
}
}
// End of the Kick command
// 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.
[Command("hentai")]
public async Task Hentai()
@@ -1069,5 +1152,24 @@ public class Commands : ModuleBase
}
}
// 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
}