Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement