-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdel.py
506 lines (436 loc) · 23.2 KB
/
del.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
import discord
import logging
import asyncio
import json
import sys, os
from os import system
import time
from colored import fg, bg, attr
import re
import requests
os.system('cls' if os.name == 'nt' else 'clear')
if getattr(sys, 'frozen', False):
application_path = os.path.dirname(sys.executable)
running_mode = 'Frozen/executable'
else:
try:
app_full_path = os.path.realpath(__file__)
application_path = os.path.dirname(app_full_path)
running_mode = "Non-interactive (e.g. 'python myapp.py')"
except NameError:
application_path = os.getcwd()
running_mode = 'Interactive'
green = fg('#4EC98F')
magenta = fg('#7D0068')
yellow = fg('#FFCC00')
red = fg('#FF0000')
white = fg('#FFFFFF')
BOLD = attr('bold')
res = attr('reset') + white
ignoreChannelCount = 0
isBusy = False
version_num = 'v2.0.4'
print(f'\33]0;Fetus Deletus ' + version_num + ' - Developed by: Notorious\a', end='', flush=True)
print(green
+ ' █████▒▓█████▄▄▄█████▓ █ ██ ██████ ▓█████▄ ▓█████ ██▓ ▓█████▄▄▄█████▓ █ ██ ██████ \n'
+ '▓██ ▒ ▓█ ▀▓ ██▒ ▓▒ ██ ▓██▒▒██ ▒ ▒██▀ ██▌▓█ ▀ ▓██▒ ▓█ ▀▓ ██▒ ▓▒ ██ ▓██▒▒██ ▒ \n'
+ '▒████ ░ ▒███ ▒ ▓██░ ▒░▓██ ▒██░░ ▓██▄ ░██ █▌▒███ ▒██░ ▒███ ▒ ▓██░ ▒░▓██ ▒██░░ ▓██▄ \n'
+ '░▓█▒ ░ ▒▓█ ▄░ ▓██▓ ░ ▓▓█ ░██░ ▒ ██▒ ░▓█▄ ▌▒▓█ ▄ ▒██░ ▒▓█ ▄░ ▓██▓ ░ ▓▓█ ░██░ ▒ ██▒\n'
+ '░▒█░ ░▒████▒ ▒██▒ ░ ▒▒█████▓ ▒██████▒▒ ░▒████▓ ░▒████▒░██████▒░▒████▒ ▒██▒ ░ ▒▒█████▓ ▒██████▒▒\n'
+ ' ▒ ░ ░░ ▒░ ░ ▒ ░░ ░▒▓▒ ▒ ▒ ▒ ▒▓▒ ▒ ░ ▒▒▓ ▒ ░░ ▒░ ░░ ▒░▓ ░░░ ▒░ ░ ▒ ░░ ░▒▓▒ ▒ ▒ ▒' + yellow + BOLD + version_num + res + green + ' ░\n'
+ ' ░ ░ ░ ░ ░ ░░▒░ ░ ░ ░ ░▒ ░ ░ ░ ▒ ▒ ░ ░ ░░ ░ ▒ ░ ░ ░ ░ ░ ░░▒░ ░ ░ ░ ░▒ ░ ░\n'
+ ' ░ ░ ░ ░ ░░░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░░░ ░ ░ ░ ░ ░ \n'
+ ' ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ \n'
+ res)
if os.name == 'nt':
jfile = application_path + '\\settings.json'
ifile = application_path + '\\ignore_channels.txt'
igfile = application_path + '\\ignore_guilds.txt'
else:
jfile = application_path + '/settings.json'
ifile = application_path + '/ignore_channels.txt'
igfile = application_path + '/ignore_guilds.txt'
if os.path.exists(jfile):
jdata = json.load(open(jfile))
else:
jdata = open(jfile, 'w')
jtmp = '{\n\"token\":\"Token_Here\",\n\"command_prefix\":\".\",\n\"del_command\":\"d\",\n\"del_all_dms_command\":\"dd\",\n\"del_all_servers_command\":\"ds\",\n\"del_all_command\":\"da\",\n\"ignore_add_command\":\"ia\",\n\"ignore_add_server_command\":\"ias\",\n\"ignore_del_command\":\"id\"\n}'
jdata.write(jtmp)
jdata.close()
jdata = json.load(open(jfile))
os.environ["rg"] = str(jdata['token'])
token = str(jdata['token'])
os.environ["rg"] = str(jdata['command_prefix'])
command_prefix = str(jdata['command_prefix'])
os.environ["rg"] = str(jdata['del_command'])
del_command = str(jdata['del_command'])
os.environ["rg"] = str(jdata['del_all_command'])
del_all_command = str(jdata['del_all_command'])
os.environ["rg"] = str(jdata['del_all_servers_command'])
del_all_servers_command = str(jdata['del_all_servers_command'])
os.environ["rg"] = str(jdata['del_all_dms_command'])
del_all_dms_command = str(jdata['del_all_dms_command'])
os.environ["rg"] = str(jdata['ignore_add_command'])
ignore_add_command = str(jdata['ignore_add_command'])
os.environ["rg"] = str(jdata['ignore_add_server_command'])
ignore_add_server_command = str(jdata['ignore_add_server_command'])
os.environ["rg"] = str(jdata['ignore_del_command'])
ignore_del_command = str(jdata['ignore_del_command'])
r = requests.get('https://raw.githubusercontent.com/noto-rious/Fetus-Deletus/master/version.txt').text
if r != version_num:
print(red + 'Looks like you may not be running the most current version. Check https://noto.cf/fd for an update!' + res)
print()
if token == 'Token_Here':
print (red + 'You haven\'t properly configured the \'settings.json\' file. Please put your Discord token in settings.json using the correct JSON syntax and then run the program again.' + res)
time.sleep(30)
sys.exit()
ignoreChannelList = []
ignoreGuildList = []
if os.path.exists(ifile):
ignoreChannelList = open(ifile).read().split('\n')
else:
ignoreChannelList = open(ifile, 'w')
ignoreChannelList.write('')
ignoreChannelList.close()
if len(ignoreChannelList) != None:
ignoreChannelCount = len(ignoreChannelList)-1
else:
ignoreChannelCount = 0
if os.path.exists(igfile):
ignoreGuildList = open(igfile).read().split('\n')
else:
ignoreGuildList = open(igfile, 'w')
ignoreGuildList.write('')
ignoreGuildList.close()
if len(ignoreGuildList) != None:
ignoreGuildCount = len(ignoreGuildList)-1
else:
ignoreGuildCount = 0
ready = False
client = discord.Client()
def printWelcome():
print(res + magenta + time.strftime('%I:%M %p', time.localtime()).rstrip() + res + ' -> Fetus Deletus -> Welcome, ' + green + BOLD + str(client.user) + res + '.')
print(res + magenta + time.strftime('%I:%M %p', time.localtime()).rstrip() + res + ' -> Fetus Deletus -> You are ignoring ' + green + BOLD + f'{ignoreChannelCount:,}' + res + ' channel(s) and ' + green + BOLD + str(ignoreGuildCount) + res + ' server(s)')
print(res + magenta + time.strftime('%I:%M %p', time.localtime()).rstrip() + res + ' -> Fetus Deletus -> Your commands are ' + green + BOLD + command_prefix + del_command + res + ', ' + green + BOLD + command_prefix + del_all_dms_command + res + ', ' + green + BOLD + command_prefix + del_all_servers_command + res + ', ' + green + BOLD + command_prefix + del_all_command + res + ', ' + green + BOLD + command_prefix + ignore_add_command + res + ', ' + green + BOLD + command_prefix + ignore_add_server_command + res + ' and ' + green + BOLD + command_prefix + ignore_del_command + res)
print(res + magenta + time.strftime('%I:%M %p', time.localtime()).rstrip() + res + ' -> Fetus Deletus -> Monitoring ' + green + BOLD + calc_Chan() + res + ' channels in ' + green + BOLD + f'{len(client.guilds):,}' + res + ' servers and ' + green + BOLD + f'{len(client.users):,}' + res + ' DM\'s.')
print()
def progress(count, total, status=''):
bar_len = 8
filled_len = int(round(bar_len * count / float(total)))
percents = round(100.0 * count / float(total), 1)
bar = '=' * filled_len + '-' * (bar_len - filled_len)
sys.stdout.write("\033[K")
sys.stdout.write('\r[%s %s%s] %s\r' % (green + bar + res, yellow + str(percents), '%' + res, status))
sys.stdout.flush()
def calc_time(start):
elapsed = time.time() - start
seconds = elapsed % (24 * 3600)
hour = seconds // 3600
seconds %= 3600
minutes = seconds // 60
seconds %= 60
return "%d:%02d:%02d" % (hour, minutes, seconds)
def calc_Chan():
chans = 0
for guild in client.guilds:
chans += len(guild.channels)
chans += len(client.users)
chans = chans - len(ignoreChannelList)-1
return f'{chans:,}'
def ChanID(message):
if isinstance(message.channel, discord.DMChannel):
return message.channel.recipient.id
elif isinstance(message.channel, discord.GroupChannel):
return message.channel.id
elif isinstance(message.channel, discord.TextChannel):
return message.guild.id
def Chan(message):
if isinstance(message.channel, discord.DMChannel):
return 'DM with ' + green + BOLD + format_name(str(message.channel.recipient)) + res
elif isinstance(message.channel, discord.TextChannel):
return 'in ' + green + BOLD + format_name(str(message.guild)) + res
elif isinstance(message.channel, discord.GroupChannel):
return 'Group DM: ' + green + BOLD + format_name(str(message.channel)) + res
def format_name(name):
name = (name[:27] + '...') if len(name) > 30 else name
return name
@client.event
async def AddGuildIgnore(guild):
global ignoreGuildList
if str(guild.id) not in(ignoreGuildList):
ignoreGuildList.append(str(guild.id))
with open(igfile, 'a') as f:
f.write(str(guild.id) + '\n')
f.close()
if isBusy != True:
print(res + magenta + time.strftime('%I:%M %p', time.localtime()).rstrip() + res + ' -> Fetus Deletus -> Added ' + green + BOLD + format_name(str(guild.name)) + res + ' to the server ignore list.')
print()
else:
if isBusy != True:
print(res + magenta + time.strftime('%I:%M %p', time.localtime()).rstrip() + res + ' -> Fetus Deletus -> ' + red + BOLD + format_name(str(guild.name)) + res + ' is already in the server ignore list.')
print()
@client.event
async def AddChannelIgnore(channel):
global ignoreChannelList
if str(channel.id) not in(ignoreChannelList):
ignoreChannelList.append(str(channel.id))
with open(ifile, 'a') as f:
f.write(str(channel.id) + '\n')
f.close()
if isBusy != True:
print(res + magenta + time.strftime('%I:%M %p', time.localtime()).rstrip() + res + ' -> Fetus Deletus -> Added ' + green + BOLD + format_name(str(channel.name)) + res + ' to the channel ignore list.')
print()
else:
if isBusy != True:
print(res + magenta + time.strftime('%I:%M %p', time.localtime()).rstrip() + res + ' -> Fetus Deletus -> ' + red + BOLD + format_name(str(channel.name)) + res + ' is already in the channel ignore list.')
print()
@client.event
async def DelIgnore(message):
global ignoreGuildList
global ignoreChannelList
FoundItem = False
if str(message.guild.id) in(ignoreGuildList):
ignoreGuildList.remove(str(message.guild.id))
with open(igfile, "r") as f:
lines = f.readlines()
with open(igfile, "w") as f:
for line in lines:
if line.strip("\n") != str(message.guild.id):
f.write(line)
ignoreGuildList = open(igfile).read().split('\n')
if isBusy != True:
FoundItem = True
print(res + magenta + time.strftime('%I:%M %p', time.localtime()).rstrip() + res + ' -> Fetus Deletus -> Removed ' + green + BOLD + format_name(str(message.guild.name)) + res + ' from the server ignore list.')
print()
if str(message.channel.id) in(ignoreChannelList):
ignoreChannelList.remove(str(message.channel.id))
with open(ifile, "r") as f:
lines = f.readlines()
with open(ifile, "w") as f:
for line in lines:
if line.strip("\n") != str(message.channel.id):
f.write(line)
ignoreChannelList = open(ifile).read().split('\n')
if isBusy != True:
FoundItem = True
print(res + magenta + time.strftime('%I:%M %p', time.localtime()).rstrip() + res + ' -> Fetus Deletus -> Removed ' + green + BOLD + format_name(str(message.channel.name)) + res + ' from the channel ignore list.')
print()
if isBusy != True and FoundItem != True:
print(res + magenta + time.strftime('%I:%M %p', time.localtime()).rstrip() + res + ' -> Fetus Deletus -> ' + red + BOLD + format_name(str(message.channel)) + res + ' is not in the ignore list.')
print()
@client.event
async def on_connect():
global ready
if ready == False:
ready = True
printWelcome()
@client.event
async def on_ready():
global ready
if ready == False:
ready = True
printWelcome()
@client.event
async def on_message(message):
global ready
global isBusy
global ignoreChannelList
global ignoreGuildList
#i should add argument support to ignore add and del
if ready == False:
ready = True
printWelcome()
if message.content.startswith(command_prefix + ignore_add_server_command) and message.author == client.user and isBusy == False:
await AddGuildIgnore(message.guild)
await DeleteCommand(message)
elif message.content.startswith(command_prefix + ignore_add_command) and message.author == client.user:
if isinstance(message.channel, discord.TextChannel):
await AddChannelIgnore(message.channel)
elif isinstance(message.channel, discord.DMChannel):
await AddChannelIgnore(message.channel.recipient)
await DeleteCommand(message)
if message.content.startswith(command_prefix + ignore_del_command) and message.author == client.user and isBusy == False:
await DelIgnore(message)
await DeleteCommand(message)
if message.content == command_prefix + del_all_command and message.author == client.user:
if isBusy == True:
await DeleteCommand(message)
return
isBusy = True
await DeleteCommand(message)
print(res + magenta + time.strftime('%I:%M %p', time.localtime()).rstrip() + res + ' -> Fetus Deletus -> ' + green + BOLD + command_prefix + del_all_command + res + ' accepted in ' + Chan(message) + res + '. Please wait...')
await DeleteAll()
print()
elif message.content.startswith(command_prefix + del_all_dms_command) and message.author == client.user:
if isBusy == True:
await DeleteCommand(message)
return
isBusy = True
await DeleteCommand(message)
print(res + magenta + time.strftime('%I:%M %p', time.localtime()).rstrip() + res + ' -> Fetus Deletus -> ' + green + BOLD + command_prefix + del_all_dms_command + res + ' accepted in ' + Chan(message) + res + '. Please wait...')
await DeleteAllDMs()
print()
elif message.content.startswith(command_prefix + del_all_servers_command) and message.author == client.user:
if isBusy == True:
await DeleteCommand(message)
return
isBusy = True
await DeleteCommand(message)
print(res + magenta + time.strftime('%I:%M %p', time.localtime()).rstrip() + res + ' -> Fetus Deletus -> ' + green + BOLD + command_prefix + del_all_servers_command + res + ' accepted in ' + Chan(message) + res + '. Please wait...')
await DeleteAllServers()
print()
elif message.content.startswith(command_prefix + del_command + ' ') and message.author == client.user:
#if isBusy == True:
# await DeleteCommand(message)
# return
#if str(ChanID(message)) in(ignoreChannelList) or str(ChanID(message)) in(ignoreGuildList):
# await DeleteCommand(message)
# if str(ChanID(message)) in(ignoreChannelList):
# print(res + magenta + time.strftime('%I:%M %p', time.localtime()).rstrip() + res + ' -> Fetus Deletus -> You can\'t delete messages sent to ' + red + BOLD + str(Chan(message)) + res + '.')
# if str(ChanID(message)) in(ignoreGuildList):
# print(res + magenta + time.strftime('%I:%M %p', time.localtime()).rstrip() + res + ' -> Fetus Deletus -> You can\'t delete messages sent to ' + red + BOLD + format_name(str(message.guild.name)) + res + '.')
#else:
msg = message.content
t = msg[len(command_prefix + del_command):].strip()
t = re.sub('[^0-9]','', t)
if isBusy != True:
print(res + magenta + time.strftime('%I:%M %p', time.localtime()).rstrip() + res + ' -> Fetus Deletus -> Deleting messages sent to ' + green + BOLD + str(Chan(message)) + res + '. Please wait...')
await DeleteMessages(message,int(t))
if isBusy != True:
print()
elif message.content == command_prefix + del_command and message.author == client.user:
#if isBusy != True:
# await DeleteCommand(message)
# return
#if str(ChanID(message)) in(ignoreChannelList) or str(ChanID(message)) in(ignoreGuildList):
# await DeleteCommand(message)
# if str(ChanID(message)) in(ignoreChannelList):
# print(res + magenta + time.strftime('%I:%M %p', time.localtime()).rstrip() + res + ' -> Fetus Deletus -> You can\'t delete messages sent to ' + red + BOLD + str(Chan(message)) + res + '.')
# if str(ChanID(message)) in(ignoreGuildList):
# print(res + magenta + time.strftime('%I:%M %p', time.localtime()).rstrip() + res + ' -> Fetus Deletus -> You can\'t delete messages sent to ' + red + BOLD + format_name(str(message.guild.name)) + res + '.')
#else:
if isBusy != True:
print(res + magenta + time.strftime('%I:%M %p', time.localtime()).rstrip() + res + ' -> Fetus Deletus -> Deleting messages sent to ' + green + BOLD + str(Chan(message)) + res + '. Please wait...')
await DeleteMessages(message,99999)
if isBusy != True:
print()
@client.event
async def DeleteAllDMs():
global ignoreChannelList
global isBusy
start_time = time.time()
i = 0
counter = 0
theID = 0
maxLen = len(client.private_channels)
for channel in client.private_channels:
if isinstance(channel, discord.DMChannel):
tmp_chan = res + 'DM with ' + green + BOLD + format_name(str(channel.recipient))
theID = channel.recipient.id
elif isinstance(channel, discord.GroupChannel):
tmp_chan = res + 'Group DM: ' + green + BOLD + format_name(str(channel))
theID = channel.id
if str(theID) not in(ignoreChannelList):
async for message in channel.history(limit=None):
try:
if message.author == client.user:
await message.delete()
counter += 1
except Exception as e:
pass
progress(i, maxLen, status='Deleted ' + green + BOLD + f'{counter:,}' + res + ' sent Messages.' + res + ' - Elapsed: ' + green + BOLD + calc_time(start_time) + res + ' - in ' + green + BOLD + tmp_chan + res)
i += 1
progress(maxLen, maxLen, status=' FINISHED! Elapsed Time: ' + green + BOLD + calc_time(start_time) + res + ' - Total Deleted: ' + green + BOLD + f'{counter:,}' + res)
print()
isBusy = False
@client.event
async def DeleteAllServers():
global ignoreChannelList
global isBusy
start_time = time.time()
i = 0
counter = 0
maxLen = len(client.guilds)
for guild in client.guilds:
if str(guild.id) not in(ignoreGuildList):
for channel in guild.text_channels:
if str(channel.id) not in(ignoreChannelList):
try:
async for message in channel.history(limit=None):
if message.author == client.user:
await message.delete()
counter += 1
progress(i, maxLen, status='Deleted ' + green + BOLD + f'{counter:,}' + res + ' sent Messages.' + res + ' - Elapsed: ' + green + BOLD + calc_time(start_time) + res + ' - in ' + green + BOLD + format_name(str(guild)) + res)
except Exception as e:
pass
i += 1
progress(i, maxLen, status=' FINISHED! Elapsed Time: ' + green + BOLD + calc_time(start_time) + res + ' - Total Deleted: ' + green + BOLD + f'{counter:,}' + res)
print()
isBusy = False
@client.event
async def DeleteAll():
global ignoreChannelList
global isBusy
start_time = time.time()
i = 0
counter = 0
theID = 0
maxLen = len(client.private_channels) + len(client.guilds)
for channel in client.private_channels:
if isinstance(channel, discord.DMChannel):
tmp_chan = res + 'DM with ' + green + BOLD + format_name(str(channel.recipient))
theID = channel.recipient.id
elif isinstance(channel, discord.GroupChannel):
tmp_chan = res + 'Group DM: ' + green + BOLD + format_name(str(channel))
theID = channel.id
if str(theID) not in(ignoreChannelList):
async for message in channel.history(limit=None):
try:
if message.author == client.user:
await message.delete()
counter += 1
except Exception as e:
pass
progress(i, maxLen, status='Deleted ' + green + BOLD + f'{counter:,}' + res + ' sent Messages.' + res + ' - Elapsed: ' + green + BOLD + calc_time(start_time) + res + ' - in ' + green + BOLD + tmp_chan + res)
i += 1
if i == maxLen:
progress(i, maxLen, status=' FINISHED! Elapsed Time: ' + green + BOLD + calc_time(start_time) + res + ' - Total Deleted: ' + green + BOLD + f'{counter:,}' + res)
print()
for guild in client.guilds:
if str(guild.id) not in(ignoreGuildList):
for channel in guild.text_channels:
if str(channel.id) not in(ignoreChannelList):
try:
async for message in channel.history(limit=None):
if message.author == client.user:
await message.delete()
counter += 1
progress(i, maxLen, status='Deleted ' + green + BOLD + f'{counter:,}' + res + ' sent Messages.' + res + ' - Elapsed: ' + green + BOLD + calc_time(start_time) + res + ' - in ' + green + BOLD + format_name(str(guild)) + res)
except Exception as e:
pass
i += 1
progress(i, maxLen, status=' FINISHED! Elapsed Time: ' + green + BOLD + calc_time(start_time) + res + ' - Total Deleted: ' + green + BOLD + f'{counter:,}' + res)
print()
isBusy = False
@client.event
async def DeleteMessages(message,max):
counter = 0
await DeleteCommand(message)
async for msg in message.channel.history(limit=None):
if int(max) > counter:
try:
if msg.author == client.user:
await msg.delete()
counter += 1
except Exception as e:
pass
else:
pass
if isBusy != True:
print(res + magenta + time.strftime('%I:%M %p', time.localtime()).rstrip() + res + ' -> Fetus Deletus -> Finished deleting ' + green + BOLD + f'{counter:,}' + res + ' messages sent to ' + str(Chan(message)) + res + '.')
@client.event
async def DeleteCommand(message):
await message.edit(content='x')
await message.edit(content='xD')
await message.delete()
client.run(token, bot=False)