368 lines
14 KiB
Python
Executable File
368 lines
14 KiB
Python
Executable File
import discord
|
|
|
|
|
|
def get_help_message(method):
|
|
"""
|
|
get_help_message(method)
|
|
|
|
Returns the information and usage of each of dale bot's funtions.
|
|
When adding a new feature to dale bot, please add some information about
|
|
it here
|
|
"""
|
|
|
|
supported_methods = {
|
|
"8ball": [
|
|
"Ask dale bot a question and it will give you an 8ball response",
|
|
"\nUsage: !8ball Will I win the lottery tomorrow?",
|
|
],
|
|
"ask": [
|
|
"Submits your query to wolfram alpha. If that cannot be answered, tries wikipedia\n",
|
|
"\nUsage: !ask 100lbs to KG",
|
|
],
|
|
"avatar": [
|
|
"Returns the avatar for the mentioned user",
|
|
"\nUsage: !avatar @somebody",
|
|
],
|
|
"birb": ["Returns a random bird photo", "\nUsage: !birb"],
|
|
"bf5": [
|
|
"Returns some API stats about a battlefield 5 character",
|
|
"\nUsage: !bf5 <your origin account name>",
|
|
],
|
|
"dale": ["Posts a photo or video of Dale, the goodest boy.", "\nUsage: !dale"],
|
|
"donate": ["Returns ways you can donate to the bot"],
|
|
"cowboy": ["Posts a photo of a bad dog.", "\nUsage: !cowboy"],
|
|
"redpanda": ["Returns a random red panda photo", "\nUsage: !redpanda"],
|
|
"panda": ["Returns a random panda photo", "\nUsage: !panda"],
|
|
"koala": ["Returns a random koala photo", "\nUsage: !koala"],
|
|
"clap": [
|
|
"Returns the shittiest meme created by sassy girls on twitter this century",
|
|
"\nUsage: !clap some text to be meme'mt",
|
|
],
|
|
"simp": [
|
|
"Returns a license to be a simp",
|
|
"\nUsage: !simp https://some.photo.jpg",
|
|
],
|
|
"horny": [
|
|
"Returns a license to be horny",
|
|
"\nUsage: !horny https://some.photo.jpg",
|
|
],
|
|
"wasted": [
|
|
"Overlays the GTAV wasted text over the image you link",
|
|
"\nUsage: !wasted https://some.photo.jpg",
|
|
],
|
|
"cleanup": [
|
|
"Admin use only. Deletes dale bot's messages from the channel",
|
|
"\nUsage: !cleanup",
|
|
],
|
|
"corona": [
|
|
"Pulls the latest corona virus stats per state from Johns Hopkins data",
|
|
"\n!corona Colorado",
|
|
],
|
|
"decide": [
|
|
"dale-bot will help make the tough decisions for you",
|
|
" If there is only one option, it will give you a yes or no",
|
|
"\nUsage: !decide cake or pie\n!decide should I do my homework",
|
|
],
|
|
"ffxiv": [
|
|
"Pulls a characters data from the lodestone API\n",
|
|
"\nUsage: !ffxiv <First name> <last name> <server>\n",
|
|
"eg: !ffxiv Slamsong Bardley Adamantoise\n\n",
|
|
"Did you know that the critically acclaimed MMORPG Final Fantasy XIV has a free trial,\n",
|
|
"and includes the entirety of A Realm Reborn AND the award-winning Heavensward expansion\n",
|
|
"up to level 60 with no restrictions on playtime? Sign up, and enjoy Eorzea today!",
|
|
],
|
|
"define": [
|
|
"Returns a definiton of a word from urban dictionary",
|
|
"\nUsage: !define loli",
|
|
],
|
|
"dog": ["Returns the URL to a G O O D B O Y E or G I R L", "\nUsage: !dog"],
|
|
"emoji": [
|
|
"Uploads the passed in URL to the server as an emoji.",
|
|
"\nDiscord does not support GIFS. It will throw an error if you try."
|
|
"\nUsage: !emoji http://pictures.com/some_image.png my_new_emoji\n",
|
|
"or `!emoji del some_emoji` to delete",
|
|
],
|
|
"excuse": [
|
|
"Generates a random excuse you can give your boss",
|
|
"\nUsage: !excuse",
|
|
],
|
|
"greentext": [
|
|
"Grabs a greentext story from redditchat so you can laugh at the misfortune of others",
|
|
"\nUsage: !greentext",
|
|
],
|
|
"help": ["Shows you this message"],
|
|
"homepage": [
|
|
"This function now outputs the SWEET-ASS picture of the day.",
|
|
" Note this picture only changes once a day.",
|
|
"\nUsage: !homepage",
|
|
],
|
|
"invite": [
|
|
"Generates a one time use invite to the voice channel you are currently in.\n",
|
|
"if you are not in a voice channel, the invite will be for whatever channel !invite was typed in.\n"
|
|
"You can also specify if you want it to be a temporary invite by adding `temp` to the end\n",
|
|
"\nUsage: !invite or !invite temp",
|
|
],
|
|
"issue": [
|
|
"Creates an issue on gitlab with the passed in parameters\n",
|
|
"\nUsage: !issue <issue title>; <issue description>",
|
|
],
|
|
"icon": [
|
|
"Returns the server's icon URL\n",
|
|
"\nUsage: !icon",
|
|
],
|
|
"info": [
|
|
"Returns a blurb with information about the discord server\n",
|
|
"\nUsage: !info",
|
|
],
|
|
"lewd": [
|
|
"Returns a URL for a lewd image.",
|
|
"Can only be used in NSFW channels.",
|
|
"\nUsage: !lewd",
|
|
],
|
|
"purge": [
|
|
"By default, will delete your last 20 messages. You can override this",
|
|
" with your own number. \nUsage: !purge or !purge 15",
|
|
],
|
|
"poll": [
|
|
"Creates a poll in the channel, allowing up to 10 options\n\n",
|
|
'\nUsage: !poll "What is your favorite pizza toppping?" cheese peppers pineapple',
|
|
],
|
|
"roles": [
|
|
"dale bot will PM you a message with all the roles you have on the server"
|
|
],
|
|
"wallpaper": [
|
|
"Returns the URL for a 4k wallpaper. You can enter",
|
|
"a search term as well. Supports multiple search terms as well",
|
|
"\nUsage: !wallpaper flowers or !wallpaper mountain flowers sky ",
|
|
],
|
|
"message": [
|
|
"You can ask me a question directly and I will do my best to answer it.",
|
|
"\nUsage: @dale-bot what is the capital of France?",
|
|
],
|
|
"meme": [
|
|
"Generates a meme on the fly!",
|
|
"\nExamples of all templates can be seen here https://memegen.link/examples"
|
|
"\n\nUsage: !meme doge top text; bottom text",
|
|
],
|
|
"nft": [
|
|
"Polls opensea and gets a random monkey from bored ape yacht club",
|
|
"\nUsage: !nft",
|
|
],
|
|
"owo": [
|
|
"Returns some fucky wucky text\n",
|
|
"\nUsage: !owo what the fuck did you just fucking say about me you little shit?",
|
|
],
|
|
"rat": ["Returns a random rat photo", "\nUsage: !rat"],
|
|
"roll": [
|
|
"Rolls N number of Y sided die\n",
|
|
"\nUsage: !roll 3d20\n",
|
|
"You can also add a modifier on the end with a +",
|
|
"\nUsage: !roll 2d20+5",
|
|
],
|
|
"sd": [
|
|
"Issues a prompt against stable diffusion. This requires my windows computer to be online.\n",
|
|
"For help with writing useful prompts, check out this article: https://wiki.installgentoo.com/wiki/Stable_Diffusion#Prompt_Design_.2F_General_Tips\n",
|
|
"\n\nHere is a list of artists the the AI is able to understand https://rentry.org/artists_sd-v1-4",
|
|
"Usage: !sd A picture of a woman sitting by a bridge with blonde hair, wearing a black dress",
|
|
"\n\nParentheses are emphasis, brackets are de-emphasis. No text is normal weighting. Numbers like 1.45 are more precise weightings.",
|
|
"\nOrder of prompts matters a lot, but it's not always clear how because the AI doesn't work how our brains work",
|
|
],
|
|
"sheeb": ["Returns a picture of a sheeb"],
|
|
"source": ["Links you to the git repo with dale-bot's source code"],
|
|
"stock": [
|
|
"Returns basic stock information for the stock you entered. Add -v or --verbose for additional stock info.",
|
|
"\nUsage: !stock AAPL TSLA -v",
|
|
],
|
|
"sus": [
|
|
"Returns an amogus crew mate whos being sus",
|
|
"\nUsage: !sus",
|
|
],
|
|
"trackdays": [
|
|
"Returns the track schedule for the tracks we frequent (buttonwillow and thunderhill).\n",
|
|
"\nUsage: !trackdays",
|
|
],
|
|
"tts": [
|
|
"Uploads a file with the specified text as an MP3.\nThis is advanced shitposting",
|
|
"\nUsage: !tts who watches the watchmen?",
|
|
"\nTo list all languages, you can type `!tts langs`",
|
|
],
|
|
"twitter": [
|
|
"Uploads an image of a fake tweet with the message IDs content.\nThis is advanced shitposting",
|
|
"\nTo use this, copy the ID of a message in your channel, and invoke twitter with the message ID as an argument\n"
|
|
"\nUsage: !twitter 979779350750724097",
|
|
],
|
|
"youtube": [
|
|
"Searches youtube for the query string and returns the first result",
|
|
"\nUsage: !youtube sick bmx tricks",
|
|
],
|
|
"waifu": [
|
|
"returns an anime girl you can pretend will love you",
|
|
"\nUsage: !waifu",
|
|
],
|
|
"neko": ["returns a cat anime girl", "\nUsage: !neko"],
|
|
"bully": ["returns a violent anime girl or guy", "\nUsage: !bully"],
|
|
"cry": ["returns a crying anime girl", "\nUsage: !cry"],
|
|
"hug": ["returns an anime girl hugging you", "\nUsage: !hug"],
|
|
"kiss": ["returns an anime kiss (you pathetic virgin)", "\nUsage: !kiss"],
|
|
"lick": [
|
|
"returns an anime girl licking someone or something",
|
|
"\nUsage: !lick",
|
|
],
|
|
"pat": ["returns an anime girl patting someone or something", "\nUsage: !pat"],
|
|
"smug": ["returns an anime girl discarding your opinion", "\nUsage: !smug"],
|
|
"highfive": ["returns an anime girl(s) high fiving", "\nUsage: !highfive"],
|
|
"nom": ["returns an anime girl nomming someone or something", "\nUsage: !nom"],
|
|
"bite": ["returns an anime girl biting someone or something", "\nUsage: !bite"],
|
|
"slap": [
|
|
"returns an anime girl slapping someone or something",
|
|
"\nUsage: !slap",
|
|
],
|
|
"wink": ["returns an anime girl winking at you", "\nUsage: !wink"],
|
|
"poke": ["returns an anime girl poking someone or something", "\nUsage: !poke"],
|
|
"dance": ["returns an anime girl dancing", "\nUsage: !dance"],
|
|
"cringe": ["returns an anime girl cringing", "\nUsage: !cringe"],
|
|
"blush": ["returns an anime girl blushing", "\nUsage: !blush"],
|
|
"yeet": ["returns an anime girl getting yeetetd", "\nUsage: !yeet"],
|
|
"cuddle": ["returns an anime girl cuddling", "\nUsage: !cuddle"],
|
|
"awoo": ["returns an anime dog girl (like neko but dogs)", "\nUsage: !awoo"],
|
|
"bonk": ["returns an anime girl getting hit", "\nUsage: !bonk"],
|
|
"glomp": [
|
|
"returns an anime girl aggressively hugging. Not sure how its different than !hug",
|
|
"\nUsage: !glomp",
|
|
],
|
|
"wordle": ["Link to the worlde app running on my k8s", "\nUsage: !wordle"],
|
|
"vc": [
|
|
"Creates a role and voice channel named whatever you pass in. Only takes one argument\n",
|
|
"\nGives the role permissions to enter the voice channel\n"
|
|
"\nUsage: !vc some_role_name",
|
|
],
|
|
"verify": [
|
|
"Adds the twitter blue check mark to the previous message\n",
|
|
"\nLiterally thats all it does\n" "\nUsage: !verify",
|
|
],
|
|
}
|
|
|
|
return "```css\n{}: {}\n```".format(method, " ".join(supported_methods[method]))
|
|
|
|
|
|
def get_help_embed(bot):
|
|
categories = {
|
|
"game APIs": ["bf5", "ffxiv"],
|
|
"Fun things": [
|
|
"clap",
|
|
"excuse",
|
|
"greentext",
|
|
"homepage",
|
|
"meme",
|
|
"message",
|
|
"nft",
|
|
"owo",
|
|
"sus",
|
|
"verify",
|
|
"wordle",
|
|
],
|
|
"image utils": [
|
|
"horny",
|
|
"simp",
|
|
"tweet",
|
|
"wasted",
|
|
],
|
|
"Utilities": [
|
|
"8ball",
|
|
"ask",
|
|
"corona",
|
|
"decide",
|
|
"emoji",
|
|
"icon",
|
|
"info",
|
|
"issue",
|
|
"poll",
|
|
"roll",
|
|
"sd",
|
|
"stock",
|
|
"trackdays",
|
|
"tts",
|
|
"vc",
|
|
"wallpaper",
|
|
"youtube",
|
|
],
|
|
"user tools": ["help", "invite", "purge", "roles", "source", "donate"],
|
|
"pictures of animals": [
|
|
"birb",
|
|
"cat",
|
|
"cowboy",
|
|
"dale",
|
|
"dog",
|
|
"fox",
|
|
"kangaroo",
|
|
"koala",
|
|
"panda",
|
|
"raccoon",
|
|
"rat",
|
|
"redpanda",
|
|
"sheeb",
|
|
],
|
|
"pictures of anime girls": [
|
|
"awoo",
|
|
"bite",
|
|
"blush",
|
|
"bonk",
|
|
"bully",
|
|
"cringe",
|
|
"cry",
|
|
"cuddle",
|
|
"dance",
|
|
"glomp",
|
|
"highfive",
|
|
"hug",
|
|
"kiss",
|
|
"lewd",
|
|
"lick",
|
|
"neko",
|
|
"nom",
|
|
"pat",
|
|
"poke",
|
|
"slap",
|
|
"smug",
|
|
"waifu",
|
|
"wink",
|
|
"yeet",
|
|
],
|
|
"admin": ["cleanup"],
|
|
}
|
|
|
|
description = "\nBelow you can see all the commands I know.\n\n**Have a nice day!**"
|
|
embed = discord.Embed(description=description, color=0x428BCA, type="rich")
|
|
embed.set_author(
|
|
name="Hello! I'm {}".format(bot.user.name), icon_url=bot.user.avatar
|
|
)
|
|
|
|
for category in categories:
|
|
command_list = []
|
|
for command in categories[category]:
|
|
command_list.append("`{}`".format(command))
|
|
embed.add_field(
|
|
name="**%s**" % str(category).upper(),
|
|
value=", ".join(command_list),
|
|
inline=False,
|
|
)
|
|
|
|
description2 = (
|
|
"**Use `!help <Command>` for more information about a command.** \n\n"
|
|
+ "**Examples:** \n `!help dog` for detailed help for the dog command \n\n"
|
|
+ "**Useful links:** [My source code](https://git.luker.gq/ldooks/dragon-bot), [Donate](https://cash.me/$ldooks) \n\n"
|
|
+ "**Invite me to another server:** [Click here](https://discord.com/oauth2/authorize?client_id=%s&scope=bot&permissions=8)"
|
|
% bot.user.id
|
|
)
|
|
|
|
embed.add_field(name="\u200b", value=description2, inline=False)
|
|
return embed
|
|
|
|
|
|
def parse_message(method):
|
|
try:
|
|
explanation = get_help_message(method)
|
|
except KeyError:
|
|
return "This command could not be found."
|
|
return explanation
|