Kxffie

Ben Bot for Discord

Mar 22nd, 2022 (edited)
585
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. import nextcord
  2. from nextcord.ext import commands
  3. from config import PREFIX, TOKEN # this is where i kept the prefix/token. i.e. PREFIX=">", TOKEN="1234567890"
  4. import random
  5.  
  6. response = ["Yes.", "No.", "Bleugh.", "Hohoho.", "*flips newspaper* Shh."]
  7.  
  8. client = commands.Bot(command_prefix=PREFIX, case_insensitive=False)
  9. client.remove_command("help")
  10.  
  11. @client.event
  12. async def on_ready():
  13. print(Logged in as {client.user}')
  14.  
  15. @client.event
  16. async def on_message(message):
  17. messageContent = message.content.lower()
  18.  
  19. if message.author == client.user:
  20. return
  21.  
  22. if messageContent.startswith(PREFIX):
  23. await message.channel.send(random.choice(response))
  24.  
  25. client.run(TOKEN)
  26.  
  27. https://www.youtube.com/watch?v=II8oHa5bIps
Add Comment
Please, Sign In to add comment