Created
February 18, 2018 20:22
-
-
Save omiq/47411861741e0f73f57fe450f9270f78 to your computer and use it in GitHub Desktop.
Discord Bot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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