Skip to content

Instantly share code, notes, and snippets.

@psidex
Created April 5, 2019 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save psidex/dd7bcaf0684c9654cadb3642a888b311 to your computer and use it in GitHub Desktop.
Save psidex/dd7bcaf0684c9654cadb3642a888b311 to your computer and use it in GitHub Desktop.
basic discord.py rewrite bot
import discord
DISCORD_TOKEN = ""
class testClient(discord.Client):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
async def on_ready(self):
print("Ready")
async def on_message(self, msg):
if msg.author.bot:
pass
elif msg.content.startswith("e"):
await msg.channel.send("e")
client = testClient()
client.run(DISCORD_TOKEN)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment