Skip to content

Instantly share code, notes, and snippets.

@omiq
Created February 18, 2018 20:22
Show Gist options
  • Save omiq/47411861741e0f73f57fe450f9270f78 to your computer and use it in GitHub Desktop.
Save omiq/47411861741e0f73f57fe450f9270f78 to your computer and use it in GitHub Desktop.
Discord Bot
import discord
# discord client
client = discord.Client()
# create a new event
@client.event
async def on_ready():
print("BOOP BEEP BOOP SQUEEE!")
print("(Bot Ready)")
# listen for specific messages
@client.event
async def on_message(message):
if message.content.startswith("/hello"):
await client.send_message(message.channel, "BY YOUR COMMAND!")
# run the bot
bot = "YOUR BOT TOKEN"
client.run(bot)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment