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 ", ], "dale": ["Posts a photo or video of Dale, the goodest boy.", "\nUsage: !dale"], "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 \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 ; ", ], "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", ], "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?", ], "pout": [ "Returns the URL for an anime girl pouting you filthy weeb\n", "\nUsage: !pout", ], "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", ], "sheeb": ["Returns a picture of a sheeb"], "smug": ["Returns the URL for smug anime girl"], "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", ], "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`", ], "youtube": [ "Searches youtube for the query string and returns the first result", "\nUsage: !youtube sick bmx tricks", ], "wink": ["returns a anime girl winking at you", "\nUsage: !wink"], "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 = { "fun": [ "bf5", "clap", "excuse", "ffxiv", "greentext", "homepage", "horny", "lewd", "meme", "message", "nft", "owo", "pout", "roll", "simp", "smug", "trackdays", "verify", "wasted", "wink", "youtube", ], "util": [ "8ball", "ask", "corona", "decide", "emoji", "icon", "info", "issue", "stock", "tts", "vc", "wallpaper", ], "users": ["help", "invite", "purge", "roles", "source"], "pictures of animals": [ "birb", "cat", "dale", "dog", "fox", "kangaroo", "koala", "panda", "raccoon", "rat", "redpanda", "sheeb", ], "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 ` 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