Skip to content

Instantly share code, notes, and snippets.

@simmsb
Last active December 9, 2016 21:36
Show Gist options
  • Save simmsb/cb883d939de387fe6ca340e6e793d1c5 to your computer and use it in GitHub Desktop.
Save simmsb/cb883d939de387fe6ca340e6e793d1c5 to your computer and use it in GitHub Desktop.
poopbot
import asyncio
import discord
from discord.ext import commands
class PoopBot(commands.Bot):
def __init__(self, token):
super().__init__(description="poop bot", command_prefix=None)
self.token = token
async def on_message(self, message):
if message.author != self.user:
try:
await self.add_reaction(message, "💩")
except:
await self.say("You need to give me the 'add_reaction' permission!", delete_after=5.0)
def run(self):
super().run(self.token)
if __name__ == "__main__":
mybot = PoopBot("Bot key goes here")
mybot.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment