Created
January 4, 2019 18:02
-
-
Save Joshuliu/d35b6e2040a3d924321424a45d9891a5 to your computer and use it in GitHub Desktop.
fuck
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@commands.command(aliases=['commands']) | |
async def help(self, ctx, command = None): | |
prefix = ctx.prefix | |
if ctx.prefix == "<@424817451293736961> ": prefix = "@AppBot " | |
if ctx.guild is not None: # If the command was run in a guild | |
data = await self.bot.data(ctx.guild.id) | |
helpemb = discord.Embed( | |
title="AppBot Help", | |
description="Welcome to AppBot's commands! The default prefix is `/` and AppBot mention (`@AppBot`), but you can always customize it in `/config`. If you would like a more detailed explanation of all the commands, read our website [documentation](https://www.appbot.site/documentation).", | |
color=EMBEDCOLOR, | |
timestamp=datetime.datetime.utcnow() | |
) | |
helpemb.set_footer(text=f"Still need help? Type {prefix}support to join the support server.") | |
if self.bot.has_perms(ctx, data, 2): | |
helpemb.add_field( | |
name=f"{prefix}config", | |
value=f""" | |
The configuration menu allows you to configure everything, from applications, permissions, to the bot's settings. Use reactions to select your desired action. | |
For a detailed explanation of how to use the config command, check out the configuration tab in our [Documentation](https://www.appbot.site/documentation). | |
""") | |
if self.bot.has_perms(ctx, data, 1): | |
helpemb.add_field( | |
name=f"{prefix}review @member", | |
value="Review a specific member's application based off of the user provided." | |
) | |
helpemb.add_field( | |
name=f"{prefix}review", | |
value="Have a menu sent allowing you to review members in different ways." | |
) | |
helpemb.add_field( | |
name=f"{prefix}apps", | |
value="Retrieve a list of submitted applications and basic information about each one." | |
) | |
for app in data['apps'].values(): | |
if app['type'] == "apply": | |
helpemb.add_field( | |
name=f"{prefix}apply", | |
value="Apply for a position in this server." | |
) | |
break | |
for app in data['apps'].values(): | |
if app['type'] == "register": | |
helpemb.add_field( | |
name=f"{prefix}register", | |
value="Register to access this server." | |
) | |
break | |
for app in data['apps'].values(): | |
if app['type'] is "report": | |
helpemb.add_field( | |
name=f"{prefix}report", | |
value="Send a report application into this server." | |
) | |
break | |
helpemb.add_field( | |
name=f"{prefix}positions", | |
value="Get a list of positions to apply for." | |
) | |
helpemb.add_field( | |
name="Other Commands", | |
value=f""" | |
`{prefix}about` - Gives some information about the bot. | |
`{prefix}invite` - Retrieve a bot invite to send to others. | |
`{prefix}support` - Retrieve an invite to our support server. | |
`{prefix}donate` - Receive a donation link. | |
`{prefix}upvote` - Receive links to upvote AppBot. | |
`{prefix}ping` - Retrieve the bot's response time in milliseconds. | |
""" | |
) | |
await ctx.send(embed=helpemb) | |
else: # If the command was run in a DM: | |
desc = """ | |
Welcome to AppBot's help menu! This bot is made to manage applications for your server. | |
AppBot's commands are meant to be used in servers so that the bot knows which server's applications you want to view/edit/apply for. | |
We recommend running this command in your server so that you know what commands you are allowed to run. | |
The default prefix is `/` and AppBot mention (`@AppBot`), but running `/config` in your server allows you to customize it per server. | |
Read our [documentation](https://www.appbotsite/documentation) to check out all the commands.", | |
""" | |
await ctx.send(embed=embed("AppBot Help",desc)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment