-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbot.py
51 lines (40 loc) · 1.3 KB
/
bot.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
42
43
44
45
46
47
48
49
50
51
# bot.py
import os
import random
from discord.ext import commands
from dotenv import load_dotenv
load_dotenv()
TOKEN = os.getenv('DISCORD_TOKEN')
bot = commands.Bot(command_prefix='!')
@bot.command(name='99', help='Responds with a random quote from Brooklyn 99')
async def nine_nine(ctx):
brooklyn_99_quotes = [
'I\'m the human form of the 💯 emoji.',
'Bingpot!',
(
'Cool. Cool cool cool cool cool cool cool, '
'no doubt no doubt no doubt no doubt.'
),
]
response = random.choice(brooklyn_99_quotes)
await ctx.send(response)
@bot.command(name='moeda', help='O bot joga uma moeda')
async def moeda(ctx):
moeda = [
'Cara',
'Coroa'
]
response = random.choice(moeda)
await ctx.send(response)
@bot.command(name='teste', help='teste')
async def teste(ctx):
response = 'teste'
await ctx.send(response)
@bot.command(name='sorteio', help='Faz um sorteio.Digite o comando + números sorteados + números totais')
async def roll(ctx, number_of_dice: int, number_of_sides: int):
dice = [
str(random.choice(range(1, number_of_sides + 1)))
for _ in range(number_of_dice)
]
await ctx.send(', '.join(dice))
bot.run(TOKEN)