Last active
December 9, 2016 21:36
-
-
Save simmsb/cb883d939de387fe6ca340e6e793d1c5 to your computer and use it in GitHub Desktop.
poopbot
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 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