-
Notifications
You must be signed in to change notification settings - Fork 37
/
selfbot.py
3160 lines (2919 loc) · 144 KB
/
selfbot.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
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
"""MIT License
Copyright (c) 2022 a5traa
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE."""
#Importing modules
import asyncio
import datetime
import functools
import threading
import io
import json
import os
import random
import re
import string
import urllib.parse
import urllib.request
import time
import ctypes
import aiohttp
import colorama
import discord
from keyring import delete_password
import numpy
import requests
from urllib import parse, request
from itertools import cycle
from bs4 import BeautifulSoup as bs4
from PIL import Image
from colorama import Fore; colorama.init()
from discord.ext import commands
from discord.utils import get
from gtts import gTTS
#Variable initialization
y = Fore.LIGHTYELLOW_EX
b = Fore.LIGHTBLUE_EX
w = Fore.LIGHTWHITE_EX
languages = {
'hu': 'Hungarian, Hungary',
'nl': 'Dutch, Netherlands',
'no': 'Norwegian, Norway',
'pl': 'Polish, Poland',
'pt-BR': 'Portuguese, Brazilian, Brazil',
'ro': 'Romanian, Romania',
'fi': 'Finnish, Finland',
'sv-SE': 'Swedish, Sweden',
'vi': 'Vietnamese, Vietnam',
'tr': 'Turkish, Turkey',
'cs': 'Czech, Czechia, Czech Republic',
'el': 'Greek, Greece',
'bg': 'Bulgarian, Bulgaria',
'ru': 'Russian, Russia',
'uk': 'Ukranian, Ukraine',
'th': 'Thai, Thailand',
'zh-CN': 'Chinese, China',
'ja': 'Japanese',
'zh-TW': 'Chinese, Taiwan',
'ko': 'Korean, Korea'
}
locales = [
"da", "de",
"en-GB", "en-US",
"es-ES", "fr",
"hr", "it",
"lt", "hu",
"nl", "no",
"pl", "pt-BR",
"ro", "fi",
"sv-SE", "vi",
"tr", "cs",
"el", "bg",
"ru", "uk",
"th", "zh-CN",
"ja", "zh-TW",
"ko"
]
m_numbers = [
":one:",
":two:",
":three:",
":four:",
":five:",
":six:"
]
m_offets = [
(-1, -1),
(0, -1),
(1, -1),
(-1, 0),
(1, 0),
(-1, 1),
(0, 1),
(1, 1)
]
#SlefBot version
class SELFBOT():
__version__ = "1.0.0"
#Recovery of the configuration put in the config.json file
with open('config.json') as f:
config = json.load(f)
token = config.get('token')
password = config.get('password')
prefix = config.get('prefix')
nitro_sniper = config.get('nitro_sniper')
stream_url = config.get('stream_url')
tts_language = config.get('tts_language')
start_time = datetime.datetime.utcnow()
loop = asyncio.get_event_loop()
#SelfBot title
def atio_title():
print(f"""\n\n{Fore.RESET} ██████╗ ████████╗██╗ ██████╗ ████████╗ ██████╗ ██████╗ ██╗
██╔═══██╗╚══██╔══╝██║██╔═══██╗ ╚══██╔══╝██╔═══██╗██╔═══██╗██║
██║██╗██║ ██║ ██║██║ ██║ ██║ ██║ ██║██║ ██║██║
██║██║██║ ██║ ██║██║ ██║ ██║ ██║ ██║██║ ██║██║
╚█║████╔╝ ██║ ██║╚██████╔╝ ██║ ╚██████╔╝╚██████╔╝███████╗
╚╝╚═══╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝\n""".replace('█', f'{b}█{y}'))
print(f"""{y}------------------------------------------------------------------------------------------------------------------------\n{w}raadev {b}|{w} https://dsc.gg/astraadev {b}|{w} https://github.com/AstraaDev {b}|{w} https://ngu.bet/ {b}|{w} https://dsc.gg/ngubet {b}|{w} https://di\n{y}------------------------------------------------------------------------------------------------------------------------\n""")
#SelfBot home page
def startprint():
if nitro_sniper:
nitro_texte = f"{Fore.GREEN}Active"
else:
nitro_texte = f"{Fore.RED}Disabled"
ctypes.windll.kernel32.SetConsoleTitleW(f"SelfBot v{SELFBOT.__version__} - Made By Astraa")
atio_title()
print(f""" {y}[{b}+{y}]{w} SelfBot Informations:\n
{y}[{w}#{y}]{w} Version: v{SELFBOT.__version__}
{y}[{w}#{y}]{w} Logged in as: {Astraa.user.name}#{Astraa.user.discriminator}
{y}[{w}#{y}]{w} User ID: {Astraa.user.id}\n\n
{y}[{b}+{y}]{w} Settings View:\n
{y}[{w}#{y}]{w} Nitro Sniper: {nitro_texte}
{y}[{w}#{y}]{w} SelfBot Prefix: {Astraa.command_prefix}\n
{y}[{w}#{y}]{w} Cached Users: {len(Astraa.users)}
{y}[{w}#{y}]{w} Guilds Scraped: {len(Astraa.guilds)}\n""")
print(f"{y}[{Fore.GREEN}!{y}]{w} SelftBot Online!")
#Launching the SelfBot
def Init():
token = config.get('token')
prefix = config.get('prefix')
if token == "":
atio_title()
input(f"{y}[{Fore.LIGHTRED_EX}!{y}]{w} Please set a token in the config.json file.")
return
elif prefix == "":
atio_title()
input(f"{y}[{Fore.LIGHTRED_EX}!{y}]{w} Please set a prefix in the config.json file.")
return
try:
try:
Astraa.run(token, bot=False, reconnect=True)
except:
os.system("cls")
atio_title()
input(f"{y}[{Fore.LIGHTRED_EX}!{y}]{w} The token located in the config.json file is invalid")
return
except Exception:
os.system("cls")
atio_title()
input(f"{y}[{Fore.LIGHTRED_EX}!{y}]{w} The token located in the config.json file is invalid")
return
#Display of connection information
class Login(discord.Client):
async def on_connect(self):
guilds = len(self.guilds)
users = len(self.users)
print(f"""\n{y}[{b}+{y}]{w} Connected to: {self.user.name}#{Astraa.user.discriminator}")
{y}[{b}+{y}]{w} Token: {self.http.token}
{y}[{b}+{y}]{w} Guilds Scraped: {guilds}
{y}[{b}+{y}]{w} Users: {users}
-------------------------------""")
await self.logout()
#Initialization of the Bot parameters
intents = discord.Intents().all()
Astraa = discord.Client(intents=intents)
Astraa = commands.Bot(description='ATIO Tool - SelfBot created by Astraa', command_prefix=prefix, self_bot=True, intents=intents)
Astraa.antiraid = False
Astraa.msgsniper = True
Astraa.slotbot_sniper = True
Astraa.giveaway_sniper = True
Astraa.mee6 = False
Astraa.mee6_channel = None
Astraa.sniped_message_dict = {}
Astraa.sniped_edited_message_dict = {}
Astraa.whitelisted_users = {}
Astraa.copycat = None
Astraa.create = False
Astraa.remove_command('help')
#Set async_executor fonction
def async_executor():
def outer(func):
@functools.wraps(func)
def inner(*args, **kwargs):
thing = functools.partial(func, *args, **kwargs)
return loop.run_in_executor(None, thing)
return inner
return outer
#Executor for the tts commands
@async_executor()
def do_tts(message):
f = io.BytesIO()
tts = gTTS(text=message.lower(), lang=tts_language)
tts.write_to_fp(f)
f.seek(0)
return f
#Event initialization
@Astraa.event
async def on_command_error(ctx, error):
error_str = str(error)
error = getattr(error, 'original', error)
if isinstance(error, commands.CommandNotFound):
return
elif isinstance(error, commands.CheckFailure):
await ctx.send('[ERROR]: You\'re missing permission to execute this command...', delete_after=3)
elif isinstance(error, commands.MissingRequiredArgument):
await ctx.send(f"[ERROR]: Missing arguments: {error}", delete_after=3)
elif isinstance(error, numpy.AxisError):
await ctx.send('[ERROR]: Invalid Image', delete_after=3)
elif isinstance(error, discord.errors.Forbidden):
await ctx.send(f"[ERROR]: 404 Forbidden Access: {error}", delete_after=3)
elif "Cannot send an empty message" in error_str:
await ctx.send('[ERROR]: Message contents cannot be null', delete_after=3)
else:
ctx.send(f'[ERROR]: {error_str}', delete_after=3)
@Astraa.event
async def on_message_edit(before, after):
await Astraa.process_commands(after)
@Astraa.event
async def on_message(message):
if Astraa.copycat is not None and Astraa.copycat.id == message.author.id:
await message.channel.send(chr(173) + message.content)
def GiveawayData():
print(f"{y}[{b}+{y}]{w} SERVER: {message.guild}\n{y}[{b}+{y}]{w} CHANNEL: {message.channel}")
def SlotBotData():
print(f"{y}[{b}+{y}]{w} SERVER: {message.guild}\n{y}[{b}+{y}]{w} CHANNEL: {message.channel}")
def NitroData(elapsed, code):
print(f"{y}[{b}+{y}]{w} SERVER: {message.guild}\n{y}[{b}+{y}]{w} CHANNEL: {message.channel}\n{y}[{b}+{y}]{w} AUTHOR: {message.author}\n{y}[{b}+{y}]{w} ELAPSED: {elapsed}\n{y}[{b}+{y}]{w} CODE: {code}")
time = datetime.datetime.now().strftime("%H:%M %p")
if 'discord.gift/' in message.content:
if nitro_sniper:
start = datetime.datetime.now()
code = re.search("discord.gift/(.*)", message.content).group(1)
elapsed = datetime.datetime.now() - start
elapsed = f'{elapsed.seconds}.{elapsed.microseconds}'
token = config.get('token')
headers = {'Authorization': token}
r = requests.post(f'https://discordapp.com/api/v6/entitlements/gift-codes/{code}/redeem', headers=headers).text
if 'This gift has been redeemed already.' in r:
print(f"\n{y}[{Fore.RED}{time}{y} - {w}Nitro Already Redeemed{y}]")
NitroData(elapsed, code)
elif 'subscription_plan' in r:
print(f"\n{y}[{Fore.GREEN}{time}{y} - {w}Nitro Success{y}]")
NitroData(elapsed, code)
elif 'Unknown Gift Code' in r:
print(f"\n{y}[{Fore.RED}{time}{y} - {w}Nitro Unknown Gift Code{y}]")
NitroData(elapsed, code)
else:
return
if 'Someone just dropped' in message.content:
if Astraa.slotbot_sniper:
if message.author.id == 983332270884663297:
try:
await message.channel.send('~grab')
except discord.errors.Forbidden:
print(f"\n{y}[{Fore.RED}{time}{y} - {w}SlotBot Couldnt Grab{y}]")
SlotBotData()
print(f"\n{y}[{Fore.GREEN}{time}{y} - {w}Slotbot Grabbed{y}]")
SlotBotData()
else:
return
if 'GIVEAWAY' in message.content:
if Astraa.giveaway_sniper:
if message.author.id == 983332270884663297:
try:
await message.add_reaction("🎉")
except discord.errors.Forbidden:
print(f"\n{y}[{Fore.RED}{time}{y} - {w}Giveaway Couldnt React{y}]")
GiveawayData()
print(f"\n{y}[{Fore.GREEN}{time}{y} - {w}Giveaway Sniped{y}]")
GiveawayData()
else:
return
if f'Congratulations <@{Astraa.user.id}>' in message.content:
if Astraa.giveaway_sniper:
if message.author.id == 983332270884663297:
print(f"\n{y}[{Fore.GREEN}{time}{y} - {w}Giveaway Won{y}]")
GiveawayData()
else:
return
await Astraa.process_commands(message)
@Astraa.event
async def on_connect():
os.system('cls')
startprint()
@Astraa.event
async def on_member_ban(guild: discord.Guild, user: discord.user):
if Astraa.antiraid is True:
try:
async for i in guild.audit_logs(limit=1, action=discord.AuditLogAction.ban):
if guild.id in Astraa.whitelisted_users.keys() and i.user.id in Astraa.whitelisted_users[guild.id].keys() and i.user.id is not Astraa.user.id:
print(f"{y}[{Fore.RED}!{y}]{w} Not banned: {i.user.name}")
else:
print(f"{y}[{Fore.GREEN}!{y}]{w} Banned: {i.user.name}")
await guild.ban(i.user, reason="SelfBot - Anti-Nuke")
except Exception as e:
print(e)
@Astraa.event
async def on_member_join(member):
if Astraa.antiraid is True and member.bot:
try:
guild = member.guild
async for i in guild.audit_logs(limit=1, action=discord.AuditLogAction.bot_add):
if member.guild.id in Astraa.whitelisted_users.keys() and i.user.id in Astraa.whitelisted_users[member.guild.id].keys():
return
else:
await guild.ban(member, reason="SelfBot - Anti-Nuke")
await guild.ban(i.user, reason="SelfBot - Anti-Nuke")
except Exception as e:
print(f"{y}[{Fore.RED}!{y}]{w} Error: {e}")
@Astraa.event
async def on_member_remove(member):
if Astraa.antiraid is True:
try:
guild = member.guild
async for i in guild.audit_logs(limit=1, action=discord.AuditLogAction.kick):
if guild.id in Astraa.whitelisted_users.keys() and i.user.id in Astraa.whitelisted_users[guild.id].keys() and i.user.id is not Astraa.user.id:
print(f"{y}[{Fore.RED}!{y}]{w} Not banned")
else:
print(f"{y}[{Fore.GREEN}!{y}]{w} Banned")
await guild.ban(i.user, reason="SelfBot - Anti-Nuke")
except Exception as e:
print(f"{y}[{Fore.RED}!{y}]{w} Error: {e}")
@Astraa.event
async def on_message_delete(message):
if message.author.id == Astraa.user.id:
return
if Astraa.msgsniper:
if isinstance(message.channel, discord.DMChannel) or isinstance(message.channel, discord.GroupChannel):
attachments = message.attachments
if len(attachments) == 0:
message_content = "`" + str(discord.utils.escape_markdown(str(message.author))) + "`: " + str(
message.content).replace("@everyone", "@\u200beveryone").replace("@here", "@\u200bhere")
await message.channel.send(message_content)
else:
links = ""
for attachment in attachments:
links += attachment.proxy_url + "\n"
message_content = "`" + str(
discord.utils.escape_markdown(str(message.author))) + "`: " + discord.utils.escape_mentions(
message.content) + "\n\n**Attachments:**\n" + links
await message.channel.send(message_content)
if len(Astraa.sniped_message_dict) > 1000:
Astraa.sniped_message_dict.clear()
attachments = message.attachments
if len(attachments) == 0:
channel_id = message.channel.id
message_content = "`" + str(discord.utils.escape_markdown(str(message.author))) + "`: " + str(
message.content).replace("@everyone", "@\u200beveryone").replace("@here", "@\u200bhere")
Astraa.sniped_message_dict.update({channel_id: message_content})
else:
links = ""
for attachment in attachments:
links += attachment.proxy_url + "\n"
channel_id = message.channel.id
message_content = "`" + str(
discord.utils.escape_markdown(str(message.author))) + "`: " + discord.utils.escape_mentions(
message.content) + "\n\n**Attachments:**\n" + links
Astraa.sniped_message_dict.update({channel_id: message_content})
@Astraa.event
async def on_message_edit(before, after):
if before.author.id == Astraa.user.id:
return
if Astraa.msgsniper:
if before.content is after.content:
return
if isinstance(before.channel, discord.DMChannel) or isinstance(before.channel, discord.GroupChannel):
attachments = before.attachments
if len(attachments) == 0:
message_content = "`" + str(
discord.utils.escape_markdown(str(before.author))) + "`: \n**BEFORE**\n" + str(
before.content).replace("@everyone", "@\u200beveryone").replace("@here",
"@\u200bhere") + "\n**AFTER**\n" + str(
after.content).replace("@everyone", "@\u200beveryone").replace("@here", "@\u200bhere")
await before.channel.send(message_content)
else:
links = ""
for attachment in attachments:
links += attachment.proxy_url + "\n"
message_content = "`" + str(
discord.utils.escape_markdown(str(before.author))) + "`: " + discord.utils.escape_mentions(
before.content) + "\n\n**Attachments:**\n" + links
await before.channel.send(message_content)
if len(Astraa.sniped_edited_message_dict) > 1000:
Astraa.sniped_edited_message_dict.clear()
attachments = before.attachments
if len(attachments) == 0:
channel_id = before.channel.id
message_content = "`" + str(discord.utils.escape_markdown(str(before.author))) + "`: \n**BEFORE**\n" + str(
before.content).replace("@everyone", "@\u200beveryone").replace("@here",
"@\u200bhere") + "\n**AFTER**\n" + str(
after.content).replace("@everyone", "@\u200beveryone").replace("@here", "@\u200bhere")
Astraa.sniped_edited_message_dict.update({channel_id: message_content})
else:
links = ""
for attachment in attachments:
links += attachment.proxy_url + "\n"
channel_id = before.channel.id
message_content = "`" + str(
discord.utils.escape_markdown(str(before.author))) + "`: " + discord.utils.escape_mentions(
before.content) + "\n\n**Attachments:**\n" + links
Astraa.sniped_edited_message_dict.update({channel_id: message_content})
#SelfBot commands
#MessageSniper/AntiRaid/Mee6/SlotBot/Giveway commands
#Enable or disable the messages sniper option
@Astraa.command()
async def msgsniper(ctx, msgsniperlol=None):
await ctx.message.delete()
if str(msgsniperlol).lower() == 'true' or str(msgsniperlol).lower() == 'on':
Astraa.msgsniper = True
await ctx.send('Sniper is now **enabled**!')
elif str(msgsniperlol).lower() == 'false' or str(msgsniperlol).lower() == 'off':
Astraa.msgsniper = False
await ctx.send('Sniper is now **disabled**!')
else:
await ctx.send(f'[ERROR]: Invalid input! Command: {Astraa.command_prefix}msgsniper [true/false]')
#Enable or disable the anti raid option
@Astraa.command(aliases=['ar', 'antiraid'])
async def antinuke(ctx, antiraidparameter=None):
await ctx.message.delete()
Astraa.antiraid = False
if str(antiraidparameter).lower() == 'true' or str(antiraidparameter).lower() == 'on':
Astraa.antiraid = True
await ctx.send('Anti-Nuke is now **enabled**!')
elif str(antiraidparameter).lower() == 'false' or str(antiraidparameter).lower() == 'off':
Astraa.antiraid = False
await ctx.send('Anti-Nuke is now **disabled**!')
else:
await ctx.send(f'[ERROR]: Invalid input! Command: {Astraa.command_prefix}antiraid [true/false]')
#Enable or disable the mee6 option
@Astraa.command(aliases=["automee6"])
async def mee6(ctx, param=None):
await ctx.message.delete()
if param is None:
await ctx.send(f'[ERROR]: Invalid input! Command: {Astraa.command_prefix}mee6 [true/false]')
if str(param).lower() == 'true' or str(param).lower() == 'on':
if isinstance(ctx.message.channel, discord.DMChannel) or isinstance(ctx.message.channel, discord.GroupChannel):
await ctx.send("[ERROR]: You can't bind Auto-MEE6 to a DM or GroupChannel", delete_after=3)
return
else:
Astraa.mee6 = True
await ctx.send("Auto-MEE6 Successfully **enabled** to `" + ctx.channel.name + "`", delete_after=3)
Astraa.mee6_channel = ctx.channel.id
elif str(param).lower() == 'false' or str(param).lower() == 'off':
Astraa.mee6 = False
await ctx.send("Auto-MEE6 Successfully **disabled**", delete_after=3)
while Astraa.mee6 is True:
sentences = ['Stop waiting for exceptional things to just happen.',
'The lyrics of the song sounded like fingernails on a chalkboard.',
'I checked to make sure that he was still alive.', 'We need to rent a room for our party.',
'He had a hidden stash underneath the floorboards in the back room of the house.',
'Your girlfriend bought your favorite cookie crisp cereal but forgot to get milk.',
'People generally approve of dogs eating cat food but not cats eating dog food.',
'I may struggle with geography, but I\'m sure I\'m somewhere around here.',
'She was the type of girl who wanted to live in a pink house.',
'The bees decided to have a mutiny against their queen.',
'She looked at the masterpiece hanging in the museum but all she could think is that her five-year-old could do better.',
'The stranger officiates the meal.', 'She opened up her third bottle of wine of the night.',
'They desperately needed another drummer since the current one only knew how to play bongos.',
'He waited for the stop sign to turn to a go sign.',
'His thought process was on so many levels that he gave himself a phobia of heights.',
'Her hair was windswept as she rode in the black convertible.',
'Karen realized the only way she was getting into heaven was to cheat.',
'The group quickly understood that toxic waste was the most effective barrier to use against the zombies.',
'It was obvious she was hot, sweaty, and tired.', 'This book is sure to liquefy your brain.',
'I love eating toasted cheese and tuna sandwiches.', 'If you don\'t like toenails',
'You probably shouldn\'t look at your feet.',
'Wisdom is easily acquired when hiding under the bed with a saucepan on your head.',
'The spa attendant applied the deep cleaning mask to the gentleman’s back.',
'The three-year-old girl ran down the beach as the kite flew behind her.',
'For oil spots on the floor, nothing beats parking a motorbike in the lounge.',
'They improved dramatically once the lead singer left.',
'The Tsunami wave crashed against the raised houses and broke the pilings as if they were toothpicks.',
'Excitement replaced fear until the final moment.', 'The sun had set and so had his dreams.',
'People keep telling me "orange" but I still prefer "pink".',
'Someone I know recently combined Maple Syrup & buttered Popcorn thinking it would taste like caramel popcorn. It didn’t and they don’t recommend anyone else do it either.',
'I liked their first two albums but changed my mind after that charity gig.',
'Plans for this weekend include turning wine into water.',
'A kangaroo is really just a rabbit on steroids.',
'He played the game as if his life depended on it and the truth was that it did.',
'He\'s in a boy band which doesn\'t make much sense for a snake.',
'She let the balloon float up into the air with her hopes and dreams.',
'There was coal in his stocking and he was thrilled.',
'This made him feel like an old-style rootbeer float smells.',
'It\'s not possible to convince a monkey to give you a banana by promising it infinite bananas when they die.',
'The light in his life was actually a fire burning all around him.',
'Truth in advertising and dinosaurs with skateboards have much in common.',
'On a scale from one to ten, what\'s your favorite flavor of random grammar?',
'The view from the lighthouse excited even the most seasoned traveler.',
'The tortoise jumped into the lake with dreams of becoming a sea turtle.',
'It\'s difficult to understand the lengths he\'d go to remain short.',
'Nobody questions who built the pyramids in Mexico.',
'They ran around the corner to find that they had traveled back in time.']
await Astraa.get_channel(Astraa.mee6_channel).send(random.choice(sentences), delete_after=0.1)
await asyncio.sleep(60)
#Enable or disable the slotbot option
@Astraa.command(aliases=['slotsniper', "slotbotsniper"])
async def slotbot(ctx, param=None):
await ctx.message.delete()
Astraa.slotbot_sniper = False
if str(param).lower() == 'true' or str(param).lower() == 'on':
Astraa.slotbot_sniper = True
await ctx.send("SlotBot Successfully **enabled**", delete_after=3)
elif str(param).lower() == 'false' or str(param).lower() == 'off':
Astraa.slotbot_sniper = False
await ctx.send("SlotBot Successfully **disabled**", delete_after=3)
else:
await ctx.send(f'[ERROR]: Invalid input! Command: {Astraa.command_prefix}slotbot [true/false]')
#Enable or disable the giveway option
@Astraa.command(aliases=['giveawaysniper'])
async def giveaway(ctx, param=None):
await ctx.message.delete()
Astraa.giveaway_sniper = False
if str(param).lower() == 'true' or str(param).lower() == 'on':
Astraa.giveaway_sniper = True
await ctx.send("Giveway Sniper Successfully **enabled**", delete_after=3)
elif str(param).lower() == 'false' or str(param).lower() == 'off':
Astraa.giveaway_sniper = False
await ctx.send("Giveway Sniper Successfully **disabled**", delete_after=3)
else:
await ctx.send(f'[ERROR]: Invalid input! Command: {Astraa.command_prefix}giveaway [true/false]')
#WhiteList commands
#Add a user to the whitelist
@Astraa.command(aliases=['wl'])
async def whitelist(ctx, user: discord.Member=None):
await ctx.message.delete()
if user is None:
await ctx.send(f'[ERROR]: Invalid input! Command: {Astraa.command_prefix}whitelist <user>')
else:
if ctx.guild.id not in Astraa.whitelisted_users.keys():
Astraa.whitelisted_users[ctx.guild.id] = {}
if user.id in Astraa.whitelisted_users[ctx.guild.id]:
await ctx.send("**" + user.name.replace("*", "\*").replace("`", "\`").replace("_","\_") + "#" + user.discriminator + "** already whitelisted")
else:
Astraa.whitelisted_users[ctx.guild.id][user.id] = 0
await ctx.send("Whitelisted **" + user.name.replace("*", "\*").replace("`", "\`").replace("_","\_") + "#" + user.discriminator + "**")
#See the whitelist
@Astraa.command(aliases=['wld'])
async def whitelisted(ctx, g=None):
await ctx.message.delete()
if g == '-g' or g == '-global':
whitelist = '`All whitelisted users:`\n'
for key in Astraa.whitelisted_users:
for key2 in Astraa.whitelisted_users[key]:
user = Astraa.get_user(key2)
whitelist += '**+** ' + user.name.replace('*', "\*").replace('`', "\`").replace('_',"\_") + "**#**" + user.discriminator + " in " + Astraa.get_guild(key).name.replace('*', "\*").replace('`', "\`").replace('_', "\_") + "\n"
await ctx.send(whitelist)
else:
whitelist = "`" + ctx.guild.name.replace('*', "\*").replace('`', "\`").replace('_',"\_") + '\'s Whitelisted Users:`\n'
for key in Astraa.whitelisted_users:
if key == ctx.guild.id:
for key2 in Astraa.whitelisted_users[ctx.guild.id]:
user = Astraa.get_user(key2)
whitelist += '**+** ' + user.name.replace('*', "\*").replace('`', "\`").replace('_',"\_") + "**#**" + user.discriminator + " *(" + str(user.id) + ")*\n"
await ctx.send(whitelist)
#Remove a user from the whitelist
@Astraa.command(aliases=['uwl'])
async def unwhitelist(ctx, user: discord.Member=None):
if user is None:
await ctx.send("[ERROR]: Please specify the user you would like to unwhitelist")
else:
if ctx.guild.id not in Astraa.whitelisted_users.keys():
await ctx.send("**" + user.name.replace("*", "\*").replace("`", "\`").replace("_","\_") + "#" + user.discriminator + "** is not whitelisted")
return
if user.id in Astraa.whitelisted_users[ctx.guild.id]:
Astraa.whitelisted_users[ctx.guild.id].pop(user.id, 0)
user2 = Astraa.get_user(user.id)
await ctx.send('Successfully unwhitelisted **' + user2.name.replace('*', "\*").replace('`', "\`").replace('_',"\_") + '#' + user2.discriminator + '**')
#Clear the whitelist
@Astraa.command(aliases=['clearwl', 'clearwld'])
async def clearwhitelist(ctx):
await ctx.message.delete()
Astraa.whitelisted_users.clear()
await ctx.send('Successfully cleared the whitelist hash')
#Message Snipe commands
#Add a message to the message sniper
@Astraa.command()
async def snipe(ctx):
await ctx.message.delete()
currentChannel = ctx.channel.id
if currentChannel in Astraa.sniped_message_dict:
await ctx.send(Astraa.sniped_message_dict[currentChannel])
else:
await ctx.send("[ERROR]: No message to snipe!")
#Edit the message sniper
@Astraa.command(aliases=["esnipe"])
async def editsnipe(ctx):
await ctx.message.delete()
currentChannel = ctx.channel.id
if currentChannel in Astraa.sniped_edited_message_dict:
await ctx.send(Astraa.sniped_edited_message_dict[currentChannel])
else:
await ctx.send("[ERROR]: No message to snipe!")
#Shows servers in which you are admin
@Astraa.command()
async def adminservers(ctx):
await ctx.message.delete()
admins = []
bots = []
kicks = []
bans = []
for guild in Astraa.guilds:
if guild.me.guild_permissions.administrator:
admins.append(discord.utils.escape_markdown(guild.name))
if guild.me.guild_permissions.manage_guild and not guild.me.guild_permissions.administrator:
bots.append(discord.utils.escape_markdown(guild.name))
if guild.me.guild_permissions.ban_members and not guild.me.guild_permissions.administrator:
bans.append(discord.utils.escape_markdown(guild.name))
if guild.me.guild_permissions.kick_members and not guild.me.guild_permissions.administrator:
kicks.append(discord.utils.escape_markdown(guild.name))
adminPermServers = f"__Servers with Admin perms__: **{len(admins)}**\n__List__: {', '.join(admins)}"
botPermServers = f"\n\n__Servers with BOT_ADD Permission__: **{len(bots)}**\n__List__: {', '.join(bots)}"
banPermServers = f"\n\n__Servers with Ban Permission__: **{len(bans)}**\n__List__: {', '.join(bans)}"
kickPermServers = f"\n\n__Servers with Kick Permission__: **{len(kicks)}**\n__List__: {', '.join(kicks)}"
await ctx.send(adminPermServers + botPermServers + banPermServers + kickPermServers)
#Shows all bots in the current server
@Astraa.command()
async def bots(ctx):
await ctx.message.delete()
bots = []
for member in ctx.guild.members:
if member.bot:
bots.append(str(member.name).replace("`", "\`").replace("*", "\*").replace("_", "\_") + "#" + member.discriminator)
await ctx.send(f"__Bots in this server__: **{len(bots)}**\n__List__: {', '.join(bots)}")
#Shows all available commands
@Astraa.command()
async def help(ctx, category=None):
await ctx.message.delete()
if category is None:
embed = f"""**Astraa SelfBot | Prefix: `{Astraa.command_prefix}`**\n
> :pushpin: `GENERAL`\n*Shows all general commands* (like prefix, shutdown, ...)
> :notepad_spiral: `USEFUL`\n*Shows all useful commands* (like tts, hastebin, nitro, ...)
> :tools: `ATIO`\n*Shows all ATIO Tool commands* (like tokeninfo, serverinfo, ...)
> :space_invader: `EXPLOIT`\n*Shows all exploit commands* (like hide, edit, bypassblock, ...)
> :woozy_face: `FUN`\n*Shows all fun commands* (like magik, hack, minesweeper, ...)
> :pager: `SERVER`\n*Shows all server commands* (like copy, massban, massdm, ...)
> :paperclip: `FRIEND`\n*Shows all friend commands* (like acceptfriends, delfriends, ...)
> :restroom: `GROUP`\n*Shows all group commands* (like kickgc, leavegroup, ...)
> :barber: `MEME`\n*Shows all meme commands* (like dog, sadcat, kiss, ...)
> :incoming_envelope: `MESSAGE`\n*Shows all message commands* (like lenny, bold, empty, ...)"""
await ctx.send(embed, file=discord.File("Images/astraa.gif"))
elif str(category).lower() == "general":
embed = f"""**GENERAL COMMANDS | Prefix: `{Astraa.command_prefix}`**\n
> :handshake: `{Astraa.command_prefix}help <category>`\n*Returns all commands of that category*
> :wrench: `{Astraa.command_prefix}prefix <prefix>`\n*Changes the bot's prefix*
> :wrench: `{Astraa.command_prefix}custom`\n*Create your own command*
> :recycle: `{Astraa.command_prefix}resetcustom`\n*Reset your own command*
> :slot_machine: `{Astraa.command_prefix}slotbot <true/false>`\n*Enable or disable the slotbot option*
> :tada: `{Astraa.command_prefix}giveaway <true/false>`\n*Enable or disable the giveway option*
> :gun: `{Astraa.command_prefix}msgsniper <true/false>`\n*Enable or disable the msgsniper option*
> :anger: `{Astraa.command_prefix}antinuke <true/false>`\n*Enable or disable the antinuke option*
> :smile: `{Astraa.command_prefix}mee6 <true/false>`\n*Enable or disable the mee6 option*
> :page_facing_up: `{Astraa.command_prefix}whitelist <user>`\n*Add a user to the whitelist*
> :no_entry_sign: `{Astraa.command_prefix}unwhitelist <user>`\n*Remove a user from the whitelist*
> :broom: `{Astraa.command_prefix}clearwhitelist`\n*Clear the whitelist*
> :crown: `{Astraa.command_prefix}adminservers`\n*Shows servers in which you are admin*
> :robot: `{Astraa.command_prefix}bots`\n*Shows all bots in the current server*
> :electric_plug: `{Astraa.command_prefix}ping`\n*Returns the bot's latency*
> :hourglass: `{Astraa.command_prefix}uptime`\n*Return how long the selfbot has been running*
> :no_entry: `{Astraa.command_prefix}shutdown`\n*Shutsdown the selfbot*"""
await ctx.send(embed, file=discord.File("Images/astraa.gif"))
elif str(category).lower() == "useful":
embed_1 = f"""**USEFUL COMMANDS | Prefix: `{Astraa.command_prefix}`**\n
> :cold_face: `{Astraa.command_prefix}astraa`\n*Show my social networks*
> :broom: `{Astraa.command_prefix}clear`\n*Sends a large message filled with invisible unicode*
> :placard: `{Astraa.command_prefix}sendall <message>`\n*Sends a message in every channel*
> :mouse_three_button: `{Astraa.command_prefix}copycat <user>`\n*Copies the users messages ({Astraa.copycat})*
> :no_entry_sign: `{Astraa.command_prefix}stopcopycat`\n*Stops copycatting*
> :speaking_head: `{Astraa.command_prefix}genname`\n*Generate a fake name*
> :gear: `{Astraa.command_prefix}geoip <ip>`\n*Looks up the ip's location*
> :globe_with_meridians: `{Astraa.command_prefix}pingweb <website-url>`\n*Pings a website to see if it's up*
> :page_with_curl: `{Astraa.command_prefix}read`\n*Marks all messages as read*
> :cyclone: `{Astraa.command_prefix}gentoken <user>`\n*Returns the user's token*
> :camera: `{Astraa.command_prefix}av <link>`\n*Search a profile picture*
> :boomerang: `{Astraa.command_prefix}whois <user>`\n*Returns user's account info*
> :no_entry: `{Astraa.command_prefix}quickdelete <message>`\n*Quickly delete your message after sending it*
> :ghost: `{Astraa.command_prefix}ghost`\n*Makes your name and pfp invisible*
> :scissors: `{Astraa.command_prefix}setpfp <link>`\n*Sets the image-link as your pfp*"""
embed_2 = f"""> :art: `{Astraa.command_prefix}hexcolor #<hex-code>`\n*Returns the color of the hex-code*
> :telephone_receiver: `{Astraa.command_prefix}tts <content>`\n*Returns an mp4 file of your content*
> :pencil: `{Astraa.command_prefix}firstmsg`\n*Shows the first message in the channel history*
> :capital_abcd: `{Astraa.command_prefix}abc`\n*Cyles through the alphabet*
> :1234: `{Astraa.command_prefix}100`\n*Cycles -100*
> :clock5: `{Astraa.command_prefix}hastbin <message>`\n*Instantly creates a hastbin with your message*
> :paintbrush: `{Astraa.command_prefix}ascii <message>`\n*Creates an ASCII art of your message*
> :recycle: `{Astraa.command_prefix}cyclenick <text>`\n*Cycles through your nickname by letter*
> :x: `{Astraa.command_prefix}stopcyclenick`\n*Stops cycling your nickname*
> :movie_camera: `{Astraa.command_prefix}stream <status>`\n*Sets your streaming status*
> :joystick: `{Astraa.command_prefix}playing <status>`\n*Sets your playing status*
> :notes: `{Astraa.command_prefix}listening <status>`\n*Sets your listening status*
> :tv: `{Astraa.command_prefix}watching <status>`\n*Sets your watching status*
> :name_badge: `{Astraa.command_prefix}stopactivity`\n*Resets your status-activity*
> :confetti_ball: `{Astraa.command_prefix}rolecolor <role>`\n*Returns the role's color*"""
await ctx.send(embed_1)
await ctx.send(embed_2, file=discord.File("Images/astraa.gif"))
elif str(category).lower() == "atio":
embed = f"""**ATIO COMMANDS | Prefix: `{Astraa.command_prefix}`**\n
> :boom: `{Astraa.command_prefix}destroy`\n*Nuke a discord server*
> :magnet: `{Astraa.command_prefix}filegrabber <webhook>`\n*Send a Token Grabber File*
> :camera_with_flash: `{Astraa.command_prefix}qrgrabber <webhook>`\n*Send a QR Grabber Image*
> :boom: `{Astraa.command_prefix}tokenfuck <token>`\n*Destroy a Account with his token*
> :page_facing_up: `{Astraa.command_prefix}tokeninfo <token>`\n*Scrape info with a token*
> :recycle: `{Astraa.command_prefix}autolog <token>`\n*Log in to the account automatically*
> :broom: `{Astraa.command_prefix}cleardm <amount>`\n*Delete all dm with a user*
> :house: `{Astraa.command_prefix}hypesquad <house>`\n*Change your hypesquad badge*
> :page_facing_up: `{Astraa.command_prefix}serverinfo`\n*Get all infos about a discord server*
> :mega: `{Astraa.command_prefix}massdm <message>`\n*Mass Dm all your friends*
> :crystal_ball: `{Astraa.command_prefix}nitro`\n*Generates a random nitro code*
> :wastebasket: `{Astraa.command_prefix}webhookremove <webhook>`\n*Delete the selected webhook*"""
await ctx.send(embed, file=discord.File("Images/astraa.gif"))
elif str(category).lower() == "exploit":
embed = f"""**EXPLOIT COMMANDS | Prefix: `{Astraa.command_prefix}`**\n
> :detective: `{Astraa.command_prefix}hide <display> <hidden>`\n*Hide messages inside other messages*
> :wrench: `{Astraa.command_prefix}edit <message>`\n*Move the position of the (edited) tag*
> :lock: `{Astraa.command_prefix}bypassblock <usesrid>`\n*Message Discord users you have blocked*"""
await ctx.send(embed, file=discord.File("Images/astraa.gif"))
elif str(category).lower() == "fun":
embed = f"""**FUN COMMANDS | Prefix: `{Astraa.command_prefix}`**\n
> :vhs: `{Astraa.command_prefix}gif <query>`\n*Sends a gif based on the query*
> :city_sunset: `{Astraa.command_prefix}image <query>`\n*Returns an image*
> :airplane: `{Astraa.command_prefix}9/11`\n*Sends a 9/11 attack*
> :sweat_drops: `{Astraa.command_prefix}cum`\n*Makes you cum*
> :bird: `{Astraa.command_prefix}tweet <user> <message>`\n*Makes a fake tweet*
> :magic_wand: `{Astraa.command_prefix}magik <user>`\n*Distorts the specified user*
> :compass: `{Astraa.command_prefix}fry <user>`\n*Deep-fry the specified user*
> :mag: `{Astraa.command_prefix}blurpify <user>`\n*Blurpifies the specified user*
> :orange_circle: `{Astraa.command_prefix}phcomment <user> <message>`\n*Makes a fake PornHub comment*
> :detective: `{Astraa.command_prefix}hack <user>`\n*Hacks the user*
> :bomb: `{Astraa.command_prefix}minesweeper`\n*Play a game of minesweeper*
> :dark_sunglasses: `{Astraa.command_prefix}1337speak <message>`\n*Talk like a hacker*
> :straight_ruler: `{Astraa.command_prefix}wyr`\n*Sends a would you rather*
> :bar_chart: `{Astraa.command_prefix}poll <msg: xyz 1: xyz 2: xyz>`\n*Creates a poll*
> :speech_balloon: `{Astraa.command_prefix}topic`\n*Sends a conversation starter*
> :eggplant: `{Astraa.command_prefix}dick <user>`\n*Returns the user's dick size*
> :recycle: `{Astraa.command_prefix}reverse <message>`\n*Sends the message but in reverse-order*"""
await ctx.send(embed, file=discord.File("Images/astraa.gif"))
elif str(category).lower() == "server":
embed = f"""**SERVER COMMANDS | Prefix: `{Astraa.command_prefix}`**\n
> :mouse_three_button: `{Astraa.command_prefix}copyguild`\n*Duplicate a guild*
> :bell: `{Astraa.command_prefix}massmention <message>`\n*Mass mention users in a server*
> :door: `{Astraa.command_prefix}massban`\n*Mass ban users in a server*
> :key: `{Astraa.command_prefix}massunban`\n*Mass unban users in a server*
> :t_rex: `{Astraa.command_prefix}dynoban <user>`\n*Ban a user with dyno*
> :broom: `{Astraa.command_prefix}masskick`\n*Mass kick users in a server*
> :plunger: `{Astraa.command_prefix}massrole`\n*Mass create roles in a server*
> :no_entry_sign: `{Astraa.command_prefix}delrole`\n*Mass delete roles in a server*
> :do_not_litter: `{Astraa.command_prefix}delchannels`\n*Mass delete channels in a server*
> :writing_hand: `{Astraa.command_prefix}spam <amount>`\n*Spams a message*
> :clown: `{Astraa.command_prefix}wizz`\n*Makes a prank message about wizzing*
> :barber: `{Astraa.command_prefix}guildicon`\n*Scrape Guild icon*
> :city_sunset: `{Astraa.command_prefix}banner`\n*Scrape Guild banner*
> :crayon: `{Astraa.command_prefix}renamechannels <name>`\n*Rename all channels in a server*
> :pencil2: `{Astraa.command_prefix}servername <name>`\n*Rename server*
> :pen_ballpoint: `{Astraa.command_prefix}nickall <name>`\n*Rename everyone in a server*
> :paperclip: `{Astraa.command_prefix}massreact <emoji>`\n*Mass reacts with the specified emoji*
> :wastebasket: `{Astraa.command_prefix}purge <amount>`\n*Purges the amount of messages*"""
await ctx.send(embed, file=discord.File("Images/astraa.gif"))
elif str(category).lower() == "friend":
embed = f"""**FRIEND COMMANDS | Prefix: `{Astraa.command_prefix}`**\n
> :white_check_mark: `{Astraa.command_prefix}acceptfriends`\n*Accepts all friend requests*
> :zzz: `{Astraa.command_prefix}ignorefriends`\n*Ignores all friends requests*
> :x: `{Astraa.command_prefix}delfriends`\n*Removes all your friends*
> :wastebasket: `{Astraa.command_prefix}clearblocked`\n*Clears your block-list*"""
await ctx.send(embed, file=discord.File("Images/astraa.gif"))
elif str(category).lower() == "group":
embed = f"""**GROUP COMMANDS | Prefix: `{Astraa.command_prefix}`**\n
> :no_pedestrians: `{Astraa.command_prefix}kickgc`\n*Kick all users from group*
> :door: `{Astraa.command_prefix}leavegroups`\n*Leave a group*
> :wastebasket: `{Astraa.command_prefix}gcleave`\n*Delete you message in a group*"""
await ctx.send(embed, file=discord.File("Images/astraa.gif"))
elif str(category).lower() == "meme":
embed = f"""**MEME COMMANDS | Prefix: `{Astraa.command_prefix}`**\n
> :dog: `{Astraa.command_prefix}dog`\n*Display a dog*
> :cat: `{Astraa.command_prefix}cat`\n*Display a cat*
> :hamster: `{Astraa.command_prefix}sadcat`\n*Display a sadcat*
> :bird: `{Astraa.command_prefix}bird`\n*Display a bird*
> :fox: `{Astraa.command_prefix}fox`\n*Display a fox*
> :poultry_leg: `{Astraa.command_prefix}feed <user>`\n*Display a feed*
> :point_right: `{Astraa.command_prefix}tickle <user>`\n*Display a tickle*
> :hand_splayed: `{Astraa.command_prefix}slap <user>`\n*Display a slap*
> :heart: `{Astraa.command_prefix}hug <user>`\n*Display a hug*
> :people_hugging: `{Astraa.command_prefix}cuddle <user>`\n*Display a cuddle*
> :grimacing: `{Astraa.command_prefix}smug <user>`\n*Display a smug*
> :thumbsup: `{Astraa.command_prefix}pat <user>`\n*Display a pat*
> :kiss: `{Astraa.command_prefix}kiss <user>`\n*Display a kiss*"""
await ctx.send(embed, file=discord.File("Images/astraa.gif"))
elif str(category).lower() == "message":
embed = f"""**MESSAGE COMMANDS | Prefix: `{Astraa.command_prefix}`**\n
> :slight_smile: `{Astraa.command_prefix}shrug`\n*Returns ¯\_(ツ)_/¯*
> :smile: `{Astraa.command_prefix}lenny`\n*Returns ( ͡° ͜ʖ ͡°)*
> :hushed: `{Astraa.command_prefix}fliptable`\n*returns (╯°□°)╯︵ ┻━┻*
> :unamused: `{Astraa.command_prefix}unflip`\n*returns ┬─┬ ノ( ゜-゜ノ)*
> :muscle: `{Astraa.command_prefix}bold <message>`\n*Bolds the message*
> :lock: `{Astraa.command_prefix}censor <message>`\n*Censor the message*
> :construction: `{Astraa.command_prefix}underline <message>`\n*Underline the message*
> :upside_down: `{Astraa.command_prefix}italicize <message>`\n*Italicize the message*
> :no_entry_sign: `{Astraa.command_prefix}strike <message>`\n*Strike the message*
> ::level_slider:: `{Astraa.command_prefix}quote <message>`\n*Quote the message*
> :keyboard: `{Astraa.command_prefix}code <message>`\n*Code the message*
> :ghost: `{Astraa.command_prefix}empty`\n*Send a empty message*"""
await ctx.send(embed, file=discord.File("Images/astraa.gif"))
#General commands
#Change SelfBot prefix
@Astraa.command()
async def prefix(ctx, prefix):
await ctx.message.delete()
if prefix is None:
await ctx.send(f'[ERROR]: Invalid input! Command: {Astraa.command_prefix}prefix <prefix>')
return
Astraa.command_prefix = str(prefix)
#Create your own command
@Astraa.command(aliases=["createcommand", "new", "newcommand"])
async def custom(ctx):
if Astraa.create == False:
try:
await ctx.message.edit(content=f"Command Text:", delete_after=10)
global msgcustom
msgcustom = await ctx.bot.wait_for('message', check=lambda m: m.author == ctx.author, timeout=60)
await ctx.message.delete()
await ctx.send(f'Command: {Astraa.command_prefix}custom')
Astraa.create = True
except Exception as e:
await ctx.send(f'[ERROR]: {e}')
elif Astraa.create == True:
await ctx.message.edit(content=msgcustom.content)
#Reset your own command
@Astraa.command(aliases=["resetcommand"])
async def resetcustom(ctx):
if Astraa.create == False:
await ctx.send(f'[ERROR]: Command already reset!')
elif Astraa.create == True:
Astraa.create = False
await ctx.send(f'Command reset!')
#Shows how long you have been using the SelfBot
@Astraa.command()
async def uptime(ctx):
await ctx.message.delete()
now = datetime.datetime.utcnow() # Timestamp of when uptime function is run
delta = now - start_time
hours, remainder = divmod(int(delta.total_seconds()), 3600)
minutes, seconds = divmod(remainder, 60)
days, hours = divmod(hours, 24)
if days:
time_format = "**{d}** days, **{h}** hours, **{m}** minutes, and **{s}** seconds."
else:
time_format = "**{h}** hours, **{m}** minutes, and **{s}** seconds."
uptime_stamp = time_format.format(d=days, h=hours, m=minutes, s=seconds)
await ctx.send(uptime_stamp)
#Pinging yourself
@Astraa.command()
async def ping(ctx):
await ctx.message.delete()
before = time.monotonic()
message = await ctx.send("Pinging...")
ping = (time.monotonic() - before) * 1000
await message.edit(content=f"`{int(ping)} ms`")
#Disconnect from SlefBot
@Astraa.command(aliases=["logout"])
async def shutdown(ctx):
await ctx.message.delete()
await Astraa.logout()
#Useful commands
#Print my Network
@Astraa.command()
async def astraa(ctx):
await ctx.message.delete()
embed = f"""**MY SOCIAL NETWORKS | Prefix: `{Astraa.command_prefix}`**\n
> :pager: `Discord Server`\n*https://dsc.gg/astraadev*
> :computer: `GitHub Page`\n*https://github.com/AstraaDev*
> :robot: `SelfBot Project`\n*https://github.com/AstraaDev/Discord-SelfBot*
> :bird: `Twitter`\n*https://twitter.com/astraadev*"""
await ctx.send(embed, file=discord.File("Images/astraa.gif"))
#Clear channel messages
@Astraa.command()
async def clear(ctx):
await ctx.message.delete()
await ctx.send('ᅠᅠ' + '\n' * 400 + 'ᅠᅠ')
#Send a message in all channels
@Astraa.command()
async def sendall(ctx, *, message=None):
await ctx.message.delete()
if message is None:
await ctx.send(f'[ERROR]: Invalid input! Command: {Astraa.command_prefix}senall <message>')
return
try:
channels = ctx.guild.text_channels
for channel in channels:
await channel.send(message)
except Exception as e:
await ctx.send(f"[ERROR]: {e}")
#Start copying user messages
@Astraa.command(aliases=["copycatuser", "copyuser"])
async def copycat(ctx, user: discord.User=None):
await ctx.message.delete()
if user is None:
await ctx.send(f'[ERROR]: Invalid input! Command: {Astraa.command_prefix}copycat <user>')
return