Skip to content

Instantly share code, notes, and snippets.

@itsJlot
Created July 21, 2017 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itsJlot/a66f124d17714b8d7c95a17d8051f5fa to your computer and use it in GitHub Desktop.
Save itsJlot/a66f124d17714b8d7c95a17d8051f5fa to your computer and use it in GitHub Desktop.
import discord
import asyncio
import time as t
import random as r
client = discord.Client()
class Data:
def __init__(self):
self.reactions = {}
d = Data()
@client.event
async def on_ready():
print("Logged in as")
print(client.user.name)
@client.event
async def on_message(message):
if message.content == "!fitebuck":
for x in range(20):
await client.send_message(message.channel, ">random")
print("waited")
await client.send_message(message.channel, str(r.randint(0,10)))
if message.content.startswith("!addbind"):
msg = message.content.split()
if len(msg) > 2:
d.reactions[msg[1]] = msg[2]
if any(ext in message.content.lower() for ext in d.reactions):
for trigger in d.reactions:
if trigger in message.content.lower():
await client.add_reaction(message,d.reactions[trigger])
client.run(TOKEN)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment