Advertisement
KrishnaDas

Random Number Generator Discord Bot For Discord.py Rewrite

Nov 9th, 2018
5,547
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. #UPDATED FOR REWRITE VERSION OF DISCORD.
  2. import random
  3. import discord
  4. from discord.ext import commands
  5. prefix = "?"
  6. bot = commands.Bot(command_prefix = prefix)
  7.  
  8. @bot.event
  9. async def on_ready():
  10.     print("The bot is ready!")
  11.    
  12. @bot.command(pass_context = True)
  13. async def Hello(ctx):
  14.     await ctx.send(random.randint(1,101))
  15.    
  16. bot.run("put bot token here")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement