Created
July 21, 2017 22:21
-
-
Save itsJlot/a66f124d17714b8d7c95a17d8051f5fa to your computer and use it in GitHub Desktop.
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 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