Skip to content

Instantly share code, notes, and snippets.

@colebob9
Last active October 13, 2017 13:15
Show Gist options
  • Save colebob9/a31a45294ce57b61aa3b6a6843c3550d to your computer and use it in GitHub Desktop.
Save colebob9/a31a45294ce57b61aa3b6a6843c3550d to your computer and use it in GitHub Desktop.
Discord bot for taking any message and replying with it backwards
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