Created
April 5, 2019 17:27
-
-
Save psidex/dd7bcaf0684c9654cadb3642a888b311 to your computer and use it in GitHub Desktop.
basic discord.py rewrite 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_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