Last active
October 13, 2017 13:15
-
-
Save colebob9/a31a45294ce57b61aa3b6a6843c3550d to your computer and use it in GitHub Desktop.
Discord bot for taking any message and replying with it backwards
This file contains hidden or 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 | |
import asyncio | |
client = discord.Client() | |
@client.event | |
async def on_ready(): | |
print('------') | |
print('Logged in as') | |
print(client.user.name) | |
print(client.user.id) | |
print('------') | |
@client.event | |
async def on_message(message): | |
if message.author == client.user: | |
pass | |
else: | |
print("") | |
print("%s sent: " % message.author) | |
print(message.content) | |
msg = message.content[::-1] | |
print("Replying with: ") | |
print(msg) | |
await client.send_message(message.channel, msg) # Add this for Text to speech -> `, tts=True` | |
client.run('token') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment