-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhelp_command.py
More file actions
79 lines (68 loc) · 3.46 KB
/
help_command.py
File metadata and controls
79 lines (68 loc) · 3.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import discord
from discord.ext import commands
import pandas as pandas
import datetime
import os
import requests
import json
from dotenv import load_dotenv
from discord.utils import get
class Help(commands.Cog):
def __init__(self, bot):
self.bot=bot
client = commands.Bot(command_prefix='--')
#Group command help
client.remove_command("help")
#@client.command(pass_context=True)
#Help command
@client.group(invoke_without_command=True)
async def help(self,context):
embed= discord.Embed(title="Help", description= "Use --help <command> for extended information on a command.",color=0x00ff00)
embed.add_field(name= "Admin", value="new_project, close_project")
embed.add_field(name= "All Users", value="version, test, inspire, show_projects")
embed.set_author(name="ITAM4Code")
await context.channel.send(embed=embed)
@help.command()
async def new_project(self,context):
embed= discord.Embed(title="Create Project", description= "Crea nuevos roles para un nuevo proyecto y su respectivo canal de texto",color=0x00ff00)
embed.add_field(name="**Syntax**", value="--new_project [nombre_proyecto]")
embed.add_field(name="Permissions", value="Admin")
embed.set_author(name="ITAM4Code")
await context.channel.send(embed=embed)
@help.command()
async def version(self,context):
embed= discord.Embed(title="Version", description= "Escribe la versión actual del bot en formato Embed",color=0x00ff00)
embed.add_field(name="**Syntax**", value="--version")
embed.add_field(name="Permissions", value="All Users")
embed.set_author(name="ITAM4Code")
await context.channel.send(embed=embed)
@help.command()
async def test(self,context):
embed= discord.Embed(title="test", description= "Contesta con el mensaje enviado",color=0x00ff00)
embed.add_field(name="**Syntax**", value="--test [mensaje]")
embed.add_field(name="Permissions", value="All Users")
embed.set_author(name="ITAM4Code")
await context.channel.send(embed=embed)
@help.command()
async def inspire(self,context):
embed= discord.Embed(title="inspire", description= "Envia un mensaje aleatorio de https://zenquotes.io/api/random",color=0x00ff00)
embed.add_field(name="**Syntax**", value="--inspire")
embed.add_field(name="Permissions", value="All Users")
embed.set_author(name="ITAM4Code")
await context.channel.send(embed=embed)
@help.command()
async def close_project(self,context):
embed= discord.Embed(title="close_project", description= "Elimina el rol asignado al proyecto para que nadie más pueda ingresar. El canal de texto se queda abierto por si se retoma el proyecto",color=0x00ff00)
embed.add_field(name="**Syntax**", value="--close_project [nombre del proyecto/rol]")
embed.add_field(name="Permissions", value="Admin")
embed.set_author(name="ITAM4Code")
await context.channel.send(embed=embed)
@help.command()
async def show_projects(self,context):
embed= discord.Embed(title="show_projects", description= "Muestra los proyectos activos en la organización",color=0x00ff00)
embed.add_field(name="**Syntax**", value="--show_projects")
embed.add_field(name="Permissions", value="All Users")
embed.set_author(name="ITAM4Code")
await context.channel.send(embed=embed)
def setup(bot):
bot.add_cog(Help(bot))