-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
41 lines (28 loc) · 1.07 KB
/
main.py
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
from decouple import config
from discord.ext import commands
import metodos
bot = commands.Bot(command_prefix='-')
@bot.event
async def on_ready():
print(f"{bot.user.name} logged")
@bot.command()
async def add(ctx, arg):
metodos.add_members(ctx.message.mentions)
await send(ctx.channel, content = metodos.show_list("Grupo", metodos.group(ctx.guild.id)))
@bot.command()
async def remove(ctx, arg):
metodos.remove_members(ctx.message.mentions)
await send(ctx.channel, content = metodos.show_list("Grupo", metodos.group(ctx.guild.id)))
@bot.command()
async def group(ctx):
await send(ctx.channel, metodos.show_list("Grupo", metodos.group(ctx.guild.id)))
@bot.command(name = "remove-all")
async def remove_all(ctx):
metodos.remove_all(ctx.guild.id)
await send(ctx.channel, metodos.show_list("Grupo", metodos.group(ctx.guild.id)))
@bot.command()
async def randomize(ctx):
await send(ctx.channel, metodos.randomize(ctx.guild.id))
async def send(channel, content):
await channel.send(content = content)
bot.run(config('DISCORD_TOKEN'))