Skip to content
This repository was archived by the owner on Oct 2, 2020. It is now read-only.

Commit 29e94eb

Browse files
authored
Create autoreact.py
1 parent cb73820 commit 29e94eb

File tree

1 file changed

+130
-0
lines changed

1 file changed

+130
-0
lines changed

autoreact/autoreact.py

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
import discord
2+
from __main__ import settings
3+
import asyncio
4+
5+
class reactions:
6+
def __init__(self, bot):
7+
self.bot = bot
8+
9+
async def listener(self, message):
10+
channel = message.channel
11+
if message.author.id != self.bot.user.id:
12+
try:
13+
if message.content == "lmao":
14+
L = "\U0001f1f1"
15+
M = "\U0001f1f2"
16+
A = "\U0001f1e6"
17+
O = "\U0001f1f4"
18+
joy = "\U0001f602"
19+
cjoy = "\U0001f639"
20+
21+
async for x in self.bot.logs_from(channel, before=message.timestamp, limit=1):
22+
await self.bot.add_reaction(x, L)
23+
await self.bot.add_reaction(x, M)
24+
await self.bot.add_reaction(x, A)
25+
await self.bot.add_reaction(x, O)
26+
await self.bot.add_reaction(x, joy)
27+
await self.bot.add_reaction(x, cjoy)
28+
if message.content == "ayy":
29+
await self.bot.add_reaction(message, "נŸ‡±")
30+
await self.bot.add_reaction(message, "נŸ‡²")
31+
await self.bot.add_reaction(message, "נŸ‡¦")
32+
await self.bot.add_reaction(message, "נŸ‡´")
33+
if message.content == "wew":
34+
await self.bot.add_reaction(message, "נŸ‡±")
35+
await self.bot.add_reaction(message, "נŸ‡¦")
36+
await self.bot.add_reaction(message, "נŸ‡©")
37+
if message.content == "rekt":
38+
R = "\U0001f1f7"
39+
E = "\U0001f1ea"
40+
K = "\U0001f1f0"
41+
T = "\U0001f1f9"
42+
FINGERMIDDLE = "\U0001f595"
43+
FINGERCROSS = "\U0001f91e"
44+
45+
async for x in self.bot.logs_from(message.channel, before=message.timestamp, limit=1):
46+
await self.bot.add_reaction(x, R)
47+
await self.bot.add_reaction(x, E)
48+
await self.bot.add_reaction(x, K)
49+
await self.bot.add_reaction(x, T)
50+
await self.bot.add_reaction(x, FINGERMIDDLE)
51+
await self.bot.add_reaction(x, FINGERCROSS)
52+
53+
if message.content == "fucker":
54+
MIDDLEFINGER = "\U0001f595"
55+
F = "\U0001f1eb"
56+
U = "\U0001f1fa"
57+
C = "\U0001f1e8"
58+
K = "\U0001f1f0"
59+
Y = "\U0001f1fe"
60+
O = "\U0001f1f4"
61+
E = "\U0001f1ea"
62+
R = "\U0001f1f7"
63+
point = "\U0001f446"
64+
FIST = "\U0001f91c"
65+
bump = "\U0001f91b"
66+
67+
async for x in self.bot.logs_from(message.channel, before=message.timestamp, limit=1):
68+
await self.bot.add_reaction(x, MIDDLEFINGER)
69+
await self.bot.add_reaction(x, F)
70+
await self.bot.add_reaction(x, U)
71+
await self.bot.add_reaction(x, C)
72+
await self.bot.add_reaction(x, K)
73+
await self.bot.add_reaction(x, E)
74+
await self.bot.add_reaction(x, R)
75+
await self.bot.add_reaction(x, bump)
76+
77+
if message.content == "idgaf":
78+
S = "\U0001f1f8"
79+
U = "\U0001f1fa"
80+
D = "\U0001f1e9"
81+
G = "\U0001f1ec"
82+
O = "\U0001f1f4"
83+
R = "\U0001f1f7"
84+
L = "\U0001f1f1"
85+
I = "\U0001f1ee"
86+
T = "\U0001f1f9"
87+
fire = "\U0001f525"
88+
A = "\U0001f1e6"
89+
F = "\U0001f1eb"
90+
ok = "\U0001f44c"
91+
clap = "\U0001f44f"
92+
cool = "\U0001f60e"
93+
94+
async for x in self.bot.logs_from(message.channel, before=message.timestamp, limit=1):
95+
await self.bot.add_reaction(x, I)
96+
await self.bot.add_reaction(x, D)
97+
await self.bot.add_reaction(x, G)
98+
await self.bot.add_reaction(x, A)
99+
await self.bot.add_reaction(x, F)
100+
await self.bot.add_reaction(x, cool)
101+
S = "\U0001f1f8"
102+
if message.content == "sotru":
103+
U = "\U0001f1fa"
104+
O = "\U0001f1f4"
105+
R = "\U0001f1f7"
106+
L = "\U0001f1f1"
107+
I = "\U0001f1ee"
108+
T = "\U0001f1f9"
109+
fire = "\U0001f525"
110+
A = "\U0001f1e6"
111+
F = "\U0001f1eb"
112+
ok = "\U0001f44c"
113+
clap = "\U0001f44f"
114+
115+
async for x in self.bot.logs_from(message.channel, before=message.timestamp, limit=1):
116+
await self.bot.add_reaction(x, S)
117+
await self.bot.add_reaction(x, O)
118+
await self.bot.add_reaction(x, clap)
119+
await self.bot.add_reaction(x, T)
120+
await self.bot.add_reaction(x, R)
121+
await self.bot.add_reaction(x, U)
122+
await self.bot.add_reaction(x, ok)
123+
124+
except discord.Forbidden:
125+
pass
126+
127+
def setup(bot):
128+
n = reactions(bot)
129+
bot.add_listener(n.listener, "on_message")
130+
bot.add_cog(n)

0 commit comments

Comments
 (0)