Combreal icon

rollBot.py

Combreal | PRO | 01/18/23 08:50:33 PM UTC | 1 ⭐ | 1762 👁️ | Never ⏰ | []
Python |

520 B

|

None

|

1 👍

/

0 👎

#rollBot.py
import os
import random
import discord
from dotenv import load_dotenv
from discord.ext import commands
 
load_dotenv()
TOKEN = os.getenv('DISCORD_TOKEN')
 
intents = discord.Intents.default()
intents.members = True
intents.message_content = True
bot = commands.Bot(command_prefix='/', intents=intents)
 
@bot.event
async def on_ready():
    print(f'{bot.user.name} has connected to Discord!')
    
@bot.command(name='roll')
async def nine_nine(ctx):
    await ctx.send(random.randint(1, 100))
 
bot.run(TOKEN)
 

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎