-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.py
More file actions
41 lines (34 loc) · 1.03 KB
/
Copy pathmain.py
File metadata and controls
41 lines (34 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python
from random import randrange, choice, randint
import discord
import asyncio
import time
from requests import get
TOKEN_AUTH = "" # YOUR TOKEN HERE
ip = "" # YOUR IP HERE, LEAVE BLANK IF YOU DONT USE A VPN
client = discord.Client()
@client.event
async def on_ready():
print(client.guilds)
@client.event
async def on_reaction_add(reaction, user):
print("Someone reacted")
if reaction.emoji == "🎉":
if reaction.author.bot:
print(f"Detected giveaway, sleeping")
await asyncio.sleep(round(randint(5,10)))
await reaction.message.add_reaction("🎉")
ban.append(reaction.message.id)
print(f"Reacted!")
@client.event
async def on_message(message):
if "bot" in message.content.lower():
print(f"PanicSleep: {message.content.lower()}")
time.sleep(60)
print("PanicSleepEnd")
return
if get('https://api.ipify.org').text != str(ip):
client.run(TOKEN_AUTH, bot=False)
else:
print("HOME IP")
quit()