-
Notifications
You must be signed in to change notification settings - Fork 0
/
d-bot.py
110 lines (97 loc) · 3.86 KB
/
d-bot.py
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
import time
import requests
import discord
def getRC(recent_changes):
bruh_string = recent_changes
URL = "https://en.scpslgame.com/api.php"
S = requests.Session()
PARAMS = {
"format": "json",
"rcprop": "title|ids|flags|user|timestamp|sizes|comment",
"list": "recentchanges",
"action": "query",
"rclimit": "1",
"rctype": "edit|new",
"rcshow": "!minor|!anon"
}
R = S.get(url=URL, params=PARAMS)
DATA = R.json()
RECENTCHANGES = DATA['query']['recentchanges']
for rc in RECENTCHANGES:
bruh_string = "**" + (str(rc['title']) + "**" + " at " + str(rc['timestamp']) + " by " + str(rc['user']) + " || **Comments:** " + str(rc['comment']))
return bruh_string
time.sleep(10)
def getRCRu(recent_changes):
bruh_string = recent_changes
URL = "https://ru.scpslgame.com/api.php"
S = requests.Session()
PARAMS = {
"format": "json",
"rcprop": "title|ids|flags|user|timestamp|sizes|comment",
"list": "recentchanges",
"action": "query",
"rclimit": "1",
"rctype": "edit|new",
"rcshow": "!minor|!anon"
}
R = S.get(url=URL, params=PARAMS)
DATA = R.json()
RECENTCHANGES = DATA['query']['recentchanges']
for rc in RECENTCHANGES:
bruh_string = "**" + (str(rc['title']) + "**" + " at " + str(rc['timestamp']) + " by " + str(rc['user']) + " || **Comments:** " + str(rc['comment']))
return bruh_string
time.sleep(10)
def getRCPl(recent_changes):
bruh_string = recent_changes
URL = "https://pl.scpslgame.com/api.php"
S = requests.Session()
PARAMS = {
"format": "json",
"rcprop": "title|ids|flags|user|timestamp|sizes|comment",
"list": "recentchanges",
"action": "query",
"rclimit": "1",
"rctype": "edit|new",
"rcshow": "!minor|!anon"
}
R = S.get(url=URL, params=PARAMS)
DATA = R.json()
RECENTCHANGES = DATA['query']['recentchanges']
for rc in RECENTCHANGES:
bruh_string = "**" + (str(rc['title']) + "**" + " at " + str(rc['timestamp']) + " by " + str(rc['user']) + " || **Comments:** " + str(rc['comment']))
return bruh_string
time.sleep(10)
class MyClient(discord.Client):
async def on_ready(self):
print('Logged in as')
print(self.user.name)
print(self.user.id)
print('------')
print("it has to reach here")
channelEN = client.get_channel(CHANNEL TOKEN)
channelRU = client.get_channel(CHANNEL TOKEN)
channelPL = client.get_channel(CHANNEL TOKEN)
while True:
messageEN = await channelEN.fetch_message(channelEN.last_message_id)
messageRU = await channelRU.fetch_message(channelRU.last_message_id)
messagePL = await channelPL.fetch_message(channelPL.last_message_id)
messageEN1 = messageEN.content.strip()
messageRU1 = messageRU.content.strip()
messagePL1 = messagePL.content.strip()
print("Reaches here!")
recent_changes = None
nice_cock_bro = getRC(recent_changes).strip()
nice_tits_bro = getRCRu(recent_changes).strip()
nice_balls_bro = getRCPl(recent_changes).strip()
if nice_cock_bro != None and nice_cock_bro != messageEN1:
print("letsss gooo")
print(nice_cock_bro)
await channelEN.send(nice_cock_bro)
if nice_tits_bro != None and nice_tits_bro != messageRU1:
print("cyka blyat")
await channelRU.send(nice_tits_bro)
if nice_balls_bro != None and nice_balls_bro != messagePL1:
print("femboy")
await channelPL.send(nice_balls_bro)
client = MyClient()
client.run(TOKEN)