-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
2862 lines (2605 loc) · 198 KB
/
app.py
File metadata and controls
2862 lines (2605 loc) · 198 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
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
import discord
import discord.utils
import asyncio
import math
import random
import psutil
import json
import requests
import wikipedia
import time
from time import perf_counter
import uptime
import string
import pymongo
from pymongo import MongoClient
import bs4
import urllib
import urllib.request
import urllib3
import googlesearch
from googlesearch import search
from discord.ext import commands
import pplpcl
import csv
import platform
import gc
import os
import qrcode
from PIL import Image
import play_scraper
import google_play_scraper
import pprint
# import pyzbar.pyzbar
import io
from discordTogether import DiscordTogether
from server import keep_alive
from discord_components import DiscordComponents, Button, Select, SelectOption
version = "1.9.3"
botingscheme = "main" # beta or main
# strtuptime = int(uptime.uptime())
client = discord.Client()
togetherControl = DiscordTogether(client)
cluster = MongoClient("mongodb+srv://bot:1234@cluster0.5bkqm.mongodb.net/discord?retryWrites=true&w=majority")
db = cluster["discord"]
collection = db["bot"]
acrackerfile = open("cracker.py", "rb")
toktokdic = pplpcl.load(acrackerfile)
toktok = toktokdic[botingscheme]
wthapikey = "b79ac8eaa95ac8f6d9248eeee1fd3f08"
srakey = "8H8tuaCZeMpJgVc5EaXtOR7sM"
# ag srvr id = 708329597141385229
# id support srvr = 780625655657791518
messages = joined = 0
mtlist = []
# PRE DECLARE
# \n<a:ag_arrowgif:781395494127271947> Premium`but free` :gift_heart: (premium) \n<a:ag_arrowgif:781395494127271947> Music :notes: (music)
# \n<a:ag_arrw_hrt:781410692321640530> [Invite Asteroid Music](https://discord.com/oauth2/authorize?client_id=836830093644791809&scope=bot&permissions=37088576) :notes:
helpmbd = discord.Embed(title="Hey !! I am **Asteroid**!!\nMy Prefix is `a/`\n▬▬▬▬▬▬▬▬▬▬", description="Use `a/ <module id> help` for More Info!\nIn the Place of <module id> put the text in (Brackets) After each Module\n\n**Modules** :control_knobs: \n▬▬▬▬▬▬▬▬▬▬\n<a:ag_arrowgif:781395494127271947> Moderati\
on :tools: (mod)\n<a:ag_arrowgif:781395494127271947> Invite <a:ag_flyn_hrts_red:781395643134115852>\n<a:ag_arrowgif:781395494127271947> Party Games (game) <:ag_poker:854976463962636339>\n<a:ag_arrowgif:781395494127271947> Calculation :1234: (calculate)\n<a:ag_arrowgif:781395494127271947> Converters :thermometer: (convert)\n<a:ag_arrowgif:781395494127271947> TAX <:ag_tax:807893601244676116> (tax)\n<a:ag_arrowgif:781395494127271947> Ticket System :tickets: (ticket)\n<a:ag_arrowgif:781395494127271947> Embed Creation :card_index: (embed)\n<a:ag_arrowgif:781395494127271947>\
Say :love_letter: (say)\n<a:ag_arrowgif:781395494127271947> Random :game_die: (random)\n<a:ag_arrowgif:781395494127271947> Random Joke :joy: (joke)\n<a:ag_arrowgif:781395494127271947> Random Facts :scream: (fact)\n<a:ag_arrowgif:781395494127271947> Weather :white_sun_rain_cloud: (weather)\n<a:ag_arrowgif:781395494127271947> AI Chat :speech_balloon: (chat)\n<a:ag_arrowgif:781395494127271947> Poll :man_raising_hand: (poll)\n<a:ag_arrowgif:781395494127271947> Suggestion :pencil: (suggest)\n<a:ag_arrowgif:781395494127271947>\
Google,Wiki, +more :satellite: <a:ag_book_pgs:781410721397080084> (web)\
\n<a:ag_arrowgif:781395494127271947> QR Utility (qr)\n<a:ag_arrowgif:781395494127271947> Image generation :frame_photo:(image)\n<a:ag_arrowgif:781395494127271947> AFK :zzz: (afk)\n<a:ag_arrowgif:781395494127271947> Quizz :interrobang: (quiz)\n<a:ag_arrowgif:781395494127271947> Statistics :level_slider: (stats)\n▬▬▬▬▬▬▬▬▬▬\n**Example:**\n`a/ game help`", color=0x01FD14)
helpmbd.set_image(url="https://tavignesh.github.io/imhost/asteroid1.gif")
# EDIT TO FIELDS
invitembd = discord.Embed(title=" <a:ag_reddot:781410740619051008> **Usefull Links** <a:ag_reddot:781410740619051008> \n▬▬▬▬▬▬▬▬▬▬", description="<a:ag_arrw_hrt:781410692321640530> [Invite Me](https://discord.com/oauth2/authorize?client_id=780734060246073374&scope=applications.commands%20bot&permissions=809500159) <a:ag_tickop:781395575962599445>\n<a:ag_arrw_hrt:781410692321640530> [Vote Asteroid](https://top.gg/bot/780734060246073374/vote) :reminder_ribbon: \n<a:ag_arrw_hrt:781410692321640530> [Support Server](https://discord.gg/teszgSR9yK) <a:ag_discord:781395597277134869>\n<a:ag_arrw_hrt:781410692321640530> [Vote Support Server](https://top.gg/servers/780625655657791518/vote) :reminder_ribbon:", color=0x13FD03)
invitembd.set_image(url="https://tavignesh.github.io/imhost/asteroid1.gif")
tstmbd = discord.Embed(title="Your title\n___________", description="Your description\ndescreption2", color=000000)
badwrds = ["wtf", "fuck", "porn", "slut", "gangbang"]
global loggggg
rp = 0
loggggg = 0
global ncmnd
global prfx
global ld_prefix
ld_prefix = 1
ncmnd = 0
newpath = './imgcache'
if not os.path.exists(newpath):
os.makedirs(newpath)
#make chat channel file from db
dbdic = collection.find_one({"_id": 4322})
dblist = dbdic["ids"]
chnlfile = open("chatchannellist.dat", "wb")
try:
pplpcl.dump(dblist, chnlfile)
except Exception as e:
print(f"Chat wont work :( Error: {e}")
chnlfile.close()
print("done")
# nitro emoji nqn
def ncmnda():
ncmnd = 1
return ncmnd
def fetch_data(content):
try:
data = content.split(" ")
rldata = ""
if data[0] == "a/":
if len(data) <= 2:
return
else:
for i in range(2, len(data)):
rldata += f"{data[i]} "
return rldata
else:
if len(data) <= 1:
return
else:
for i in range(1, len(data)):
rldata += f"{data[i]} "
return rldata
except Exception as e:
return "Error"
def randata(aisjd=5):
aisjd = int(aisjd)
astrl = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
dataid = ""
for i in range(0,aisjd):
aid = random.choice(astrl)
dataid += aid
return dataid
def reload_prefix():
try:
with open("prefixes.dat", "rb") as pxfile:
prfx = pplpcl.load(pxfile)
ld_prefix = 0
return prfx
except Exception as e:
raise Exception (f"Failed to read prefixes.dat as : {e}")
@client.event
async def on_ready():
DiscordComponents(client)
if botingscheme != "main":
game = discord.Game("with v2.0.0 and Having Fun Testing New Features")
# await client.change_presence(status=discord.Status.idle, activity=game)
# await client.change_presence(status=discord.Status.online, activity=game)
# await client.change_presence(status=discord.Status.invisible, activity=game)
await client.change_presence(status=discord.Status.do_not_disturb, activity=game)
else:
await client.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name="a/ help in v1.9.3 with AI Chat !! Invite Me a/ invite"))
# await client.change_presence(status=discord.Status.online, activity=game)
# await client.change_presence(status=discord.Status.invisible, activity=game)
# await client.change_presence(status=discord.Status.do_not_disturb, activity=game)
print("{} is ONLINE!!".format(client.user))
async def update_stats():
await client.wait_until_ready()
global messages, joined
while not client.is_closed():
try:
with open("stats.txt", "a") as f:
f.write(f"Time: {int(time.time())}, Messages: {messages}, Member Joined: {joined}\n")
await asyncio.sleep(10)
except Exception as e:
print(e)
await asyncio.sleep(10)
# @client.event
# async def on_member_join(member):
# global joined
# joined += 1
# await client.send_messsage(f"""hi bro wlcome to my support server {member.mention}""")
@client.event
async def on_message(message):
global messages, loggggg
messages += 1
ans = "none"
# serverid = client.get_guild(780625655657791518)
a = 0
rp = 0
# CRIETERIA FILTER
if message.author == client.user:
ncmnda()
return
if message.author.bot:
ncmnda()
return
# LOGS
if message.content == ("logs enable") and str(message.author.id) == "641305773095387156":
loggggg = 1
if message.content == ("logs disable") and str(message.author.id) == "641305773095387156":
loggggg = 0
if loggggg == 1:
print("The Message | ", message.content, " | Was sent in | ", message.channel, " | Channel by | ", message.author, "| in SERVER =>", message.guild)
# HELPS
if message.content.startswith("A/"):
ncmnda()
await message.channel.send(embed=discord.Embed(description="My prefix is `a/`", color=0x04FD03))
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
if message.content == ("a/") or message.content == ("a/ "):
ncmnda()
await message.channel.send(embed=discord.Embed(title="Yes? , How May i Help You?",description=("Use `a/ help` for More!\n Make sure there is a space between `a/` and `help`"), color=0x04FD03))
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
if message.content == "<@!780734060246073374>":
ncmnda()
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(description="My prefix is `a/`", color=0x04FD03))
if message.content == "a/ help" or message.content == "a/help" or message.content == "A/help" or message.content == "A/ help" or message.content == "A/ info" or message.content == "a/info" or message.content == "a/ info":
emojiFromServer = client.get_emoji(879633637312720947)
wwweb = client.get_emoji(879633220809936896)
suppop = client.get_emoji(879634882249252875)
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=helpmbd, components = [[Button(label = "Website", emoji=wwweb, disabled=False, style=5, url="https://asteroidbot.xyz"),Button(label = "INVITE", disabled=False, emoji=emojiFromServer, style=5, url="https://discord.com/oauth2/authorize?client_id=780734060246073374&scope=applications.commands%20bot&permissions=809500159"), Button(label = "Support", disabled=False, emoji=suppop, style=5, url="https://discord.gg/pDzrEyGpxE")]])
if message.content.find("a/ invite") != -1 or message.content == "a/invite" or message.content == 'a/vote' or message.content == 'a/ vote' or message.content == "a/ support" or message.content == "a/support":
emojiFromServer = client.get_emoji(879633637312720947)
wwweb = client.get_emoji(879633220809936896)
suppop = client.get_emoji(879634882249252875)
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=invitembd, components = [[Button(label = "Website", emoji=wwweb, disabled=False, style=5, url="https://asteroidbot.xyz"),Button(label = "INVITE", disabled=False, emoji=emojiFromServer, style=5, url="https://discord.com/oauth2/authorize?client_id=780734060246073374&scope=applications.commands%20bot&permissions=809500159"), Button(label = "Support", disabled=False, emoji=suppop, style=5, url="https://discord.gg/pDzrEyGpxE")]])
if message.content == "a/ delete" or message.content == "a/delete":
ncmnda()
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(description="Use `a/ delete help` for Help Regarding Delete messges"))
if message.content.startswith("a/ mod ") or message.content.startswith("a/mod"):
ncmnda()
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title=":tools: Moderation <a:ag_book_pgs:769053582472642561>\n▬▬▬▬▬▬▬▬▬▬", description="All moderation Commands Needs You and Me to have Specific **Permissions** to perform Moderation!\n\n**Commands:**\n<a:ag_arrowgif:781395494127271947> <:ag_ban:774867115529469992> - `a/ ban <mention user> for <reason optional>`\n<a:ag_arrowgif:781395494127271947> Kick - `a/ kick <mention user> for <reason optional>`\n<a:ag_arrowgif:781395494127271947> Warn - `a/ warn <mention user> =<reason optional>`\n<a:ag_arrowgif:781395494127271947> Ticketing System - Use `a/ ticket help` for more info \n<a:ag_arrowgif:781395494127271947> DEcancer Names :microbe: - Use `a/ decan @mention` to change their nickname!\n<a:ag_arrowgif:781395494127271947> Delete - Use `a/ delete help` For more!\n<a:ag_arrowgif:781395494127271947> Pls Use `a/ pref help` for Chat and BadWord (Customisable) Moderation\n<a:ag_arrowgif:781395494127271947> Member Count - `a/ members`", color=0xFDDE01))
if message.content == "a/ delete help" or message.content == "a/ help delete" or message.content == "a/delete help" or message.content == "a/help delete":
ncmnda()
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="**Delete Messages** :x:\n▬▬▬▬▬▬▬▬▬▬", description="Maximum of 500 Messages can be Deleted at a Time <a:ag_reddot:781410740619051008>\nYou need to Have Manage Messages Permisiion \n\nSyntax : `a/ delete <Number of msges in number>`\n\nExample:\n`a/ delete 15`", color=0x04FD03))
if message.content == "a/ suggest help" or message.content == "a/ help suggest" or message.content == "a/suggest help" or message.content == "a/help suggest":
ncmnda()
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="**Suggesions on Me** <a:ag_discord:781395597277134869> \n▬▬▬▬▬▬▬▬▬▬", description="Your Suggesions are Really Valuable to us(me) , It helps in Improving The Bot! <a:ag_reddot:781410740619051008> \n▬▬▬▬▬▬▬▬▬▬\n\nSyntax : `a/ suggest <your suggesion>`\n\nExample:\n`a/ suggest plz include multiplayer`",color=0x04FD03))
if message.content == "a/ calculate help" or message.content == "a/ help calculate" or message.content == "a/ calculate" or message.content == "a/ calculator" or message.content == "a/calculate help" or message.content == "a/help calculate" or message.content == "a/calculate" or message.content == "a/calculator":
ncmnda()
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="**Basic Calculator** :1234:\n▬▬▬▬▬▬▬▬▬▬", description="**Mathematical Operators**\n▬▬▬▬▬▬▬▬▬▬\n`add` => Addition\n `sub` => Subtraction\n `mult` => Multiplication \n `div` => Division\n\nSyntax: `a/ <mathamatical operator> <1st number> <2nd number>`\nExample : `a/ add 13 2`\n\n**LCM and HCF**\n▬▬▬▬▬▬▬▬▬▬\n`lcm` => Least Common Multiple\n `hcf` => Highest Common Factor\n\n**Complex Calculations**\n▬▬▬▬▬▬▬▬▬▬\n For More Use `a/ ccalculator help`", color=0x05FCF1))
if message.content == "a/ ccal help" or message.content == "a/ help ccal" or message.content == "a/ccal help" or message.content == "a/help ccal":
ncmnda()
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="**Complex Calculation**:1234:\n▬▬▬▬▬▬▬▬▬▬", description="I can do a lot of **Complex Calculations**!\nThere are 2 types of Complex Calculations\n\n <a:ag_arrowgif:781395494127271947> Single input Calculation\nUse `a/ ccalculate 1 help`\n\n <a:ag_arrowgif:781395494127271947> Double Input Calculation\n Use `a/ ccalculate 2 help`", color=0xD705FC))
if message.content == "a/ ccal 1 help" or message.content == "a/ccal 1 help":
ncmnda()
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="**Complex Calculator #1** :1234:\n▬▬▬▬▬▬▬▬▬▬", description="Single Input Functions\n All single Input variable = `a`\n▬▬▬▬▬▬▬▬▬▬\n`ceil` => Gives the Nearest Integer Greater than `a`\nExample: `a/ ceil 2.4` Gives `3`\n\n`pi` => Gives the Value of `Pi`\n`e` => Gives the Value of `e`\n\n\n`floor` => Gives the Nearest Integer\
Lessser than `a`\nExample : `a/ floor 3.9` Gives `3`\n\n `sqrt` => Gives the Square Root of `a`\nExample : `a/ sqrt 9` Gives `3`\n\n `facto` => Gives the Factorial of `a`\nExample : `a/ facto 5` Gives `120`\n\n`exp` Gives the Value of `e^a`\nExample : `a/ exp 4` Gives `54.598150033144236`\n\n`log` => Gives the Natural Log of `a`\nExample : `a/ log 2` Gives `0.6931471805599453`\n\n`log10` => Gives the Log to the Base 10 of `a`\nExample : `a/ log10 2` Gives\
`0.3010299956639812`\n\n`sin, cos, tan` => Gives the Trigonometric (sin or cos or tan as Specified) Values\nExample : `a/ sin 30` Gives `0.5`\n\nCommon\
Syntax: `a/ <operator> <value(a)>`\n\n▬▬▬▬▬▬▬▬▬▬\n**More Calculations in `a/ complex 2 help`**\n\n If your Preffered Calculation is not available then plz Suggest using `a/ suggest help`", color=0xD705FC))
if message.content == "a/ convert help" or message.content == "a/ help convert" or message.content == "a/convert help" or message.content == "a/help convert":
ncmnda()
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="**Converter** :scales:\n▬▬▬▬▬▬▬▬▬▬", description="**__Temperature__**\n__Radians to Degrees__\nConverts `a` in Radians to Degrees\n Example : `a/ degrees 5` Gives `286.4788975654116`\n\n__Degrees to Radians__\nConverts `a` in Degrees to Radians\nExample : `a/ radians 90` Gives `1.5707963267948966`\n\n__Farenheit to Celcius__\nConverts Tempereture `a`\
in Farenheit to Celcius\nExample : `a/ far 32` Gives `0`\n\n**Celcius to Farenheit**\nConverts Tempereture `a` in Celcius to Farenheit\nExample : `a/ cel 0` Gives `32`\n\n__Celcius to Kelvin__\nConverts Tempereture `a` in Celcius to Kelvin\nExample : `a/ cel 0` Gives `273`\n\n__Farenheit to Kelvin__\nConverts Tempereture `a` in Celcius to Farenheit\nExample : `a/ cel 0` Gives `32`\n\n**__CURRENCY__**\nConverts or returns value of any curency from any to any currency.\n Available Currency:\n \
AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BRL BSD BTC BTN BWP CRC CUC CUP CVE CZK DJF DKK DOP DZD EEK EGP ERN ETB EUR FJD FKP GBP GEL GGP GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ILS IMP INR IQD IRR ISK JEP JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LTL LVL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLL SOS SRD STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD UYU UZS VEF VND VUV WST XAF XAG XAU XCD XDR XOF XPF YER ZAR ZMK ZMW ZWL BYN BYR BZD CAD CDF CHF CLF CLP CNY COP\n Syntax: `a/ USD`", color=0xD705FC))
if message.content == "a/ ccal 2 help" or message.content == "a/ccal 2 help":
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="**Complex Calculator #2** :1234:\n▬▬▬▬▬▬▬▬▬▬", description="Single Input Functions\n All Double Input variable = `a` and `b`\n▬▬▬▬▬▬▬▬▬▬\n`bilog` => Gives the Value of Log `a` to the Base `b`\nExample: `a/ bilog 100 2` Gives `6.643856189774725`\n\n`pow` => Gives the Value of `a` to the Power `b`\nExample: `a/ pow 5 2` Gives `25`\n\n▬▬▬▬▬▬▬▬▬▬\n**TAX**\n`tax` => Gives tax amount and Amount after tax, `a` is tax% and `b` is amount\nExample: `a/ tax 12 1000`\n\n`danktax` => Gives tax that DankMemer(bot) put on transferres\nExample: `a/ danktax 150000`", color=0xD705FC))
if message.content == "a/ afk help" or message.content == "a/ help afk" or message.content == "a/ afk" or message.content == "a/afk help":
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="AFK Status :zzz:\n▬▬▬▬▬▬▬▬▬▬", description="If you set afk status all the Messages that Ping you will be responded with a msg you gave!\n\n**Syntax:**\n<a:ag_arrowgif:781395494127271947> Set AFK - `a/ afk =<reason>`\n<a:ag_arrowgif:781395494127271947> Remove AFK - `a/ afk remove`", color=0xA205FC))
if message.content == "a/ say help" or message.content == "a/ help say" or message.content == "a/ say":
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="SAY :speech_balloon: \n▬▬▬▬▬▬▬▬▬▬", description="This Command Makes Me to Say or Delete and Say What you say!!\n\n**Syntax:**\n`a/ say = <text>` or `a/ delsay = <text>`\n\n**Example:**\n`a/ say =text this you bot!`", color=0x4805FC))
if message.content == "a/ random help" or message.content == "a/ help random":
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="Random :game_die: \n▬▬▬▬▬▬▬▬▬▬", description="This Chooses a number from 1 to `a` randomly.\n\n**Syntax:** \n`a/ random <Number>`\n\n**Example:**\n`a/ random 3`", color=0xFC058C))
if message.content == 'a/ stats help' or message.content == "a/ help stats" or message.content == 'a/stats help' or message.content == "a/help stats":
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="My Statistics :level_slider:\n▬▬▬▬▬▬▬▬▬", description="**Syntax**\n`a/ <id>` The `id` is in (brackets)\n\n**Commands**\n<a:ag_arrowgif:781395494127271947> Version Updates (updates)\n<a:ag_arrowgif:781395494127271947> CPU Usage (cpu)\n<a:ag_arrowgif:781395494127271947> Server Count (server)\n<a:ag_arrowgif:781395494127271947> My Ping or Latency (ping)\n<a:ag_arrowgif:781395494127271947> Server ID (serverid)\n\n**Example:**\n`a/ cpu`", color=0x04FD03))
if message.content == "a/ setup chat" or message.content == "a/setup chat":
if message.author.guild_permissions.administrator:
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
try:
chtcnnl = await message.guild.create_text_channel('asteroid-chat')
dbdic = collection.find_one({"_id": 4322})
dblist = dbdic["ids"]
dblist.append(chtcnnl.id)
collection.update_one({"_id": 4322}, {"$set": {"ids": dblist}})
chnlfile = open("chatchannellist.dat", "wb")
try:
pplpcl.dump(dblist, chnlfile)
except Exception as e:
print(e)
chnlfile.close()
await message.channel.send(embed=discord.Embed(title="Chat Channel Created", description="You can Chat with Me in that channel without my Prefix!", color=0x01FD14))
await message.channel.send(embed=discord.Embed(title="<a:ag_exc:781410611366985748> Note: ", description="You **CAN** freely rename, move or edit permissions of this channel!", color=0x01FD14))
except Exception as e:
print(e)
await message.channel.send(embed=discord.Embed(title="An error Occured", description="If this occures again and again Please Report the below info to "))
await message.channel.send(embed=discord.Embed(title="Chat Channel Created", description="You can Chat with Me in that channel without my Prefix!", color=0x01FD14))
await message.channel.send(embed=discord.Embed(title="<a:ag_exc:781410611366985748> Note: ", description="You can freely change, move or edit permissions of this channel!", color=0x01FD14))
else:
await message.channel.send(embed=discord.Embed(title="You Don't have Permission to Manage Channels <a:ag_exc:781410611366985748>"))
if message.content.startswith("a/ owner") or message.content.startswith("a/owner"):
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="**Vignesh_x64ᴰᵉᵛ#8351** <a:ag_flyn_hrts_cyn:781395468978356235>\nCreated me on 23th Nov 2020",color=0x04FD03))
if message.content.find("a/ chat help") != -1 or message.content == "a/ help chat" or message.content.find("a/chat help") != -1 or message.content == "a/help chat" or message.content.find("a/ AI help") != -1 or message.content == "a/ ai chat" or message.content.find("a/AI help") != -1 or message.content == "a/ai chat":
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="CHAT :speech_balloon:\n▬▬▬▬▬▬▬▬▬▬", description="<a:ag_arrowgif:781395494127271947> `a/ setup chat` will Create a New Channel to Chat mith Meee!\n<a:ag_arrowgif:781395494127271947> <More To be added here>", color=0xFC058C))
if message.content.find("a/ today help") != -1 or message.content == "a/ help today" or message.content.find("a/today help") != -1 or message.content.find("a/today help") != -1 or message.content == "a/help today" or message.content.find("a/ today help") != -1:
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="Today :date:\n▬▬▬▬▬▬▬▬▬▬", description="**Commands:**\n<a:ag_arrowgif:781395494127271947> `a/ time` :clock3: Shows the Time Now\n<a:ag_arrowgif:781395494127271947> `a/ date` :date: Shows the Date Today\n<a:ag_arrowgif:781395494127271947> <More to be added here>", color=0x6E05FC))
if message.content == "a/ wiki help" or message.content == "a/ help wiki" or message.content == "a/ wiki" or message.content == "a/wiki help" or message.content == "a/wiki help" or message.content == "a/help wiki" or message.content == "a/wiki" or message.content == "a/ wiki help":
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="Wikipedia Search :mag:\n▬▬▬▬▬▬▬▬▬▬", description="This commands Fetches Descreption about the Keyword you give.\n**Syntax:**\n`a/ wiki =keyword`\n\n**Example:**\n`a/ wiki =bot making`", color=0x05B5FC))
if message.content == "a/ help weather" or message.content == "a/ weather help" or message.content == "a/help weather" or message.content == "a/ weather" or message.content == "a/help weather" or message.content == "a/weather help" or message.content == "a/ help weather" or message.content == "a/weather":
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="Weather Reports\n▬▬▬▬▬▬▬▬▬▬", description="This Feature allows You to Get a weather Report Of your Preffered Location\n\n**Syntax:**\n`a/ weather =<location>`\n\n**Example:**\n`a/ weather =Chennai`", color=0x0527FC))
if message.content == "a/ quiz help" or message.content == "a/quiz help" or message.content == "a/ help quiz" or message.content == "a/help quiz":
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title=":speech_balloon: QUIZ <a:ag_book_pgs:769053582472642561>\n▬▬▬▬▬▬▬▬▬▬", description="Type `a/ quiz start <level> <topic id>`\n**For Topic ID Type** `a/ list topic` (Default - General Knowledge) \nLevels :\nEasy: 1\nMedium: 2\nHard: 3\nExample: `a/ quiz start 2 10`\nTo start a quiz and after answering react with a :thumbsup: for next question\nMark Counting Feature Under Development Sorry..", color=0xFDDE01))
if message.content == "a/ list topic" or message.content == "a/ topic list" or message.content == "a/list topic" or message.content == "a/ list topic" or message.content == "a/topic list" or message.content == "a/ list topic":
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="**Topic List**", description="ID | TOPIC\n1 <a:ag_arrw_hrt:781410692321640530> General Knowledge\n2 <a:ag_arrw_hrt:781410692321640530> Entertainment: Books\n3 <a:ag_arrw_hrt:781410692321640530> Entertainment: Film\n4 <a:ag_arrw_hrt:781410692321640530> Entertainment: Music\n5 <a:ag_arrw_hrt:781410692321640530> Entertainment: Musicals &\
Theatres\n6 <a:ag_arrw_hrt:781410692321640530> Entertainment: Television\n7 <a:ag_arrw_hrt:781410692321640530> Entertainment: Video Games\n8 <a:ag_arrw_hrt:781410692321640530> Entertainment: Board Games\n9 <a:ag_arrw_hrt:781410692321640530> Science & Nature\n10 <a:ag_arrw_hrt:781410692321640530> Science: Computers\n11 <a:ag_arrw_hrt:781410692321640530> Science: Mathematics\n12\
<a:ag_arrw_hrt:781410692321640530> Mythology\n13 <a:ag_arrw_hrt:781410692321640530> Sports\n14 <a:ag_arrw_hrt:781410692321640530> Geography\n15 <a:ag_arrw_hrt:781410692321640530> History\n16 <a:ag_arrw_hrt:781410692321640530> Politics\n17 <a:ag_arrw_hrt:781410692321640530> Art\n18 <a:ag_arrw_hrt:781410692321640530> Celebrities\n19 <a:ag_arrwhrt:781410692321640530> Animals\n20\
<a:ag_arrw_hrt:781410692321640530> Vehicles\n21 <a:ag_arrw_hrt:781410692321640530> Entertainment: Comics\n22 <a:ag_arrw_hrt:781410692321640530> Science: Gadgets\n23 <a:ag_arrw_hrt:781410692321640530> Entertainment: Japanese Anime & Manga\n24 <a:ag_arrw_hrt:781410692321640530> Entertainment: Cartoon & Animations\n", color=0xFDDE01))
if message.content == "a/ help set" or message.content == "a/ set help" or message.content == "a/ pref help" or message.content == "a/ help pref" or message.content == "a/help set" or message.content == "a/set help" or message.content == "a/pref help" or message.content == "a/help pref" :
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="Chat Moderation Preferences\n▬▬▬▬▬▬▬▬▬▬", description="<a:ag_arrowgif:781395494127271947> Chat Moderation Enable or Disable `a/ set chatmod true(or)false`\n<a:ag_arrowgif:781395494127271947> Deletion of Blacklisted Words `a/ set delmod true(or)false`\n<a:ag_arrowgif:781395494127271947> Add badwords to Blacklisted words `a/ badword=<word here>` Example : `a/ badword=die`\n<a:ag_arrowgif:781395494127271947> \
Remove Blacklisted word `a/ remove badword=<word>`\n<a:ag_arrowgif:781395494127271947> Add some Default Badwords `a/ badword defaults`\n<a:ag_arrowgif:781395494127271947> Clear All badwords `a/ badwords clear`", color=0xBCFC09))
if message.content == 'a/ tax' or message.content == 'a/ tax help' or message.content == 'a/ help tax' or message.content == 'a/tax' or message.content == 'a/tax help' or message.content == 'a/help tax':
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="TAX\n▬▬▬▬▬▬▬▬▬▬", description="**TAX**\n`tax` => Gives tax amount and Amount after tax.\nSyntax : `a/ tax <tax rate> <amt>`\nExample: `a/ tax 12 1000` or `a/ t 12 1000`", color=0xD705FC))
if message.content == 'a/ poll' or message.content == 'a/ poll help' or message.content == 'a/ help poll' or message.content == 'a/poll' or message.content == 'a/poll help' or message.content == 'a/help poll':
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="POLL\n▬▬▬▬▬▬▬▬▬▬", description="This command is usefull For conducting Yes or No Questions or Voting\nTwo types of polls:\n1. :thumbsup: , :thumbsdown: (`a/ poll1 =<qn>` or just `a/ poll =<qn>`)\n2. <:ag_upvote:816330395506180107>, <:ag_downvote:816330463937167391> (`a/ poll2 =<qn>`)\nSyntax : `a/ poll1 =<question>`\nExample: `a/ poll1 =How is This Bot?`\nLot of features like custom emoji reaction custom color to be added soon!", color=0xBCFC09))
if message.content == 'a/ google' or message.content == 'a/ google help' or message.content == 'a/ help google' or message.content == 'a/google' or message.content == 'a/google help' or message.content == 'a/help google':
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="Google Search <a:ag_ggl:781410701327335445>\n▬▬▬▬▬▬▬▬▬▬", description="You can search for almost anything in google with me!!\nSyntax:`a/ google <search terms>`\nExample:`a/ google asteroid bot`", color=0xBCFC09))
if message.content == 'a/ dictionary' or message.content == 'a/ def help' or message.content == 'a/ dic help' or message.content == 'a/ help def' or message.content == 'a/ help dic' or message.content == 'a/dictionary' or message.content == 'a/def help' or message.content == 'a/dic help' or message.content == 'a/help def' or message.content == 'a/help dic':
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="Dictionary 📔\n▬▬▬▬▬▬▬▬▬▬", description="You can search for definition with examples in this dictionary with me!!\nSyntax:`a/ dic =<search terms>` or `a/ def =<search term>`\nExample:`a/ def =asteroid`", color=0xBCFC09))
if message.content == 'a/ ticket help' or message.content == 'a/ help ticket' or message.content == 'a/ ticket' or message.content == 'a/ticket help' or message.content == 'a/help ticket' or message.content == 'a/ticket':
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="Ticket System <a:ag_ggl:781410701327335445>\n▬▬▬▬▬▬▬▬▬▬", description="You can Create ticket to contact staff and discuss personally!!\nTo create a ticket use `a/ new ticket =reason`\nTo enable Ticketing system feature use `a/ ticket enable`\nTo disable Ticketing system use `a/ ticket disable`\nTo Close a single ticket use `a/ close`\nTo close all tickets use `a/ close all`", color=0xBCFC09))
if message.content == 'a/ embed help' or message.content == 'a/ help embed' or message.content == 'a/ embed' or message.content == 'a/embed help' or message.content == 'a/help embed' or message.content == 'a/embed':
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
adasss = r"\n"
await message.channel.send(embed=discord.Embed(title="Embed Creation :card_index:\n▬▬▬▬▬▬▬▬▬▬", description=f"Embed is very usefull message type for creating beautifully arranged and ordered formal messages. But sadly Normal users cannot create or send embed messages. Don't worry! Asteroid is here with a new very user friendly Embed Creator!\nTo create an embed Just type `a/ embed create` and follow the instructions!\n\n**IMPORTANT INFO**\nYou can add external, default and animated emojis BUT the limitation is you can ONLY use emojis from servers I am a Member of (ie. our mutual servers, which can be viewed in my profile).\nTo jump to next line use {adasss} in the correct place where you want to jump.\nYou can ping or tag someone in the message description but NOT in the title\n The above given limitation are not limited wantedly made but are the limitations of Discord Embeds\n\n**Syntax**: `a/ embed create`", color=0xBCFC09))
if message.content == 'a/ fact help' or message.content == 'a/ help fact' or message.content == 'a/fact help' or message.content == 'a/help fact':
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="Random Facts :scream:\n▬▬▬▬▬▬▬▬▬▬", description="This shows you an interesting random fact chosen from a huge list of facts. Every care has been taken to provide good and quality facts but if some error or inapropriate or unwanted or nsfw content had crept in, just remember the fact id and send a suggsetion(`a/ suggest help`) or send a message in our [Support Server](https://discord.gg/teszgSR9yK). Sorry for the inconvinience.\n\n**Syntax**: `a/ fact`", color=0xBCFC09))
if message.content == 'a/ website' or message.content == 'a/website':
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="Make sure to check out our website!!", description="__Website:__ https://asteroidbot.xyz \n__Email:__ support@asteroidbot.xyz", color=0xBCFC09))
if message.content == 'a/ imgen' or message.content == 'a/imgen' or message.content == 'a/ imgen help' or message.content == 'a/imgen help' or message.content == 'a/ help imgen' or message.content == 'a/help imgen':
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="Image Generation :frame_photo:", description=f"Generates Modifyed images based on your Avatar!\nTypes:\nGlass, Pixel, Red, Blue, Green, YTComment, rainbow, wasted, triggered, bw, invert, bright, sepia, threshold... more will be added\nSyntax: `a/ <variety> @mention`\nExample: a/ red {message.author.mention} \nLooking for QR Code generator And Reader? Try `a/ qr help`", color=0xBCFC09))
if message.content == 'a/ qr' or message.content == 'a/qr' or message.content == 'a/ qr help' or message.content == 'a/qr help' or message.content == 'a/ help qr' or message.content == 'a/help qr':
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="QR Code Generator & Reader", description="__Generation:__\nGenerates a QR Code based on give data or link.\nSyntax: `a/ qr <data or link>`\nExample: `a/ qr https://asteroidbot.xyz` \n\n__QR Code Reader:__\nReads the qr code from the given image! It need NOT be an image Generated by me it can even be a photo!\n Syantax: `a/ qrread <direct image link>` or `a/ qrread`+attachment", color=0xBCFC09))
if message.content == 'a/ web' or message.content == 'a/web' or message.content == 'a/ web help' or message.content == 'a/web help' or message.content == 'a/ help web' or message.content == 'a/help web':
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await message.channel.send(embed=discord.Embed(title="WEB Searches!!", description="This command searches the web using a range of web places listed below:\n<a:ag_arrowgif:781395494127271947> YouTube <a:ag_yt:781395515526348801> - `a/ yt <search word>`\n<a:ag_arrowgif:781395494127271947> Google <:ag_gglsym:817776047315091459> - `a/ google <search word>` \n<a:ag_arrowgif:781395494127271947> Reddit <:ag_reddit:853191906770419724> - `a/ reddit <subreddit>`\n<a:ag_arrowgif:781395494127271947> GitHub <:ag_github:853186834339332106> - `a/ GitHub <account name>` \n<a:ag_arrowgif:781395494127271947> Playstore <:ag_playstore:853187910077775883> - `a/ PlayStore <app name>`\n<a:ag_arrowgif:781395494127271947> Dictionary <a:ag_book_pgs:781410721397080084> - `a/ def <word>`\n<a:ag_arrowgif:781395494127271947> Image Search :frame_photo: - `a/ image <search term>`\n<a:ag_arrowgif:781395494127271947> Song Lyrics :notes: - `a/ lyrics <song>`\n<a:ag_arrowgif:781395494127271947> Weather :white_sun_rain_cloud: - `a/ weather <location>`", color=0xBCFC09))
# if message.content.startswith('a/ music') or message.content == 'a/ help music' or message.content == 'a/ music help':
# await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
# await message.channel.send(embed=discord.Embed(title="Music :notes:\n▬▬▬▬▬▬▬▬▬▬", description="This feature allows you to listen to music by streaming music to a voice channel. To activate all commands join a voice channel and use `a/ play songname`. This also includes a lot of filters which can be applied to the song!!. Enjoy the music and kindly report any bugs or gliches to [Support Server](https://discord.gg/teszgSR9yK)\n__Music Commands (Usage: `a/ command`)__:\nplay, pause, clear-queue, filter, loop, nowplaying, queue, resume, search, shuffle, skip, stop, volume, w-filters\n__Filters (Usage: `a/ filter filtername`)__:\n`8D, gate, haas, phaser, treble, tremolo, vibrato, reverse, karaoke, flanger, mcompand, pulsator, subboost, bassboost, vaporwave, nightcore, normalizer, surrounding`\n\n **Introducing Asteroid Music!** \n [Invite Asteroid Music](https://discord.com/oauth2/authorize?client_id=836830093644791809&scope=bot&permissions=37088576)", color=0xBCFC09))
# PREMIUM
# if message.content.startswith("a/ premium") or message.content.startswith("a/ help premium") or message.content.startswith("a/ premium help"):
# ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
# await message.channel.send(embed=discord.Embed(title="**PREMIUM for FREE!!**\n▬▬▬▬▬▬▬▬▬▬", description="__Premium Features__:\n__NOTE__: Premium features are not available yet, so pls do not ask or create ticket for it. It will be available in next(v1.9) or v2.0 update! the below details are only tentative and just for some idea about premium \n<a:ag_arrowgif:781395494127271947> A different animated emoji will be used instead of <a:ag_flyn_hrts_cyn:781395468978356235> while reacting to your messages\n\nPresently there are NO features to enjoy in premium but lots will be added to it in upcomming updates!\nAbout premium:\nPremium here does not mean any profit of any kind to me and you will NOT be asked to USE or PAY any money or related items. Premium can be obtained by redeeming AstroCash. Astrocash can be redeemed ony by creating a ticket in our [Support Server](https://discord.gg/teszgSR9yK) but soon there will be a feature to redeem using commands! To earn AstroCash use `a/ earn` or `a/ astrocash`. Also to check your profile use `a/ profile` (not available yet) You can see the redeemption price for each feature using `a/ redeem`."))
# if message.content.startswith("a/ astrocash") or message.content.startswith("a/ earn"):
# await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
# await message.channel.send(embed=discord.Embed(title="AstroCash\n▬▬▬▬▬▬▬▬▬▬", description="AstroCash is currency for me! It can be redeemed into lots of usable features, commands or even premium. Presently you cannot transfer or trade AstroCash. To view redeemable items or Redeem AstroCash use `a/ redeem`\n\nAstroCash can be earned by:\n<a:ag_arrowgif:781395494127271947> Joining Support Server and other servers listed in a separate channel in Support Server\n<a:ag_arrowgif:781395494127271947> Finding bugs in the bot and reporting it in our [Support Server](https://discord.gg/teszgSR9yK) AstroCash will be given according to the size of the bug, you can even report typos!\n<a:ag_arrowgif:781395494127271947> Vote for me every 12hrs use `a/ vote`\n<a:ag_arrowgif:781395494127271947> Giving good suggestions using `a/ suggest help` AstroCash will be given accrding to the worthiness of suggestion ||Spamming will be dealt with punishment||\n<a:ag_arrowgif:781395494127271947> Inviteing me to servers\n<a:ag_arrowgif:781395494127271947> Gaining levels with Asteroid or Gaining levels in [Support Server](https://discord.gg/teszgSR9yK) - According to levels\n<a:ag_arrowgif:781395494127271947> Sending cool facts in a channel in [Support Server](https://discord.gg/teszgSR9yK) - 20 points\n<a:ag_arrowgif:781395494127271947> Helping creator to test the bot. Make sure you read rules in [Support Server](https://discord.gg/teszgSR9yK)\n<a:ag_arrowgif:781395494127271947> Playing Quiz - 10 points for correct and 2 points for wrong answer"))
# if message.content.startswith("a/ redeem") or message.content.startswith("a/ help redeem") or message.content.startswith("a/ help reedeem") or message.content.startswith("a/ help reedem") or message.content.startswith("a/ reedeem") or message.content.startswith("a/ reedem"):
# await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
# await message.channel.send(embed=discord.Embed(title="Item List", description="File storage space - 500 AC\nbot space - 200 AC\n5 database space - 50 AC\n:SOME: Reaction - 100\n:another: Reaction - 120\n:another: Reaction - 10000\nLevel Mutiplyer - ###\nlotz to be added (suggestions welcomed with reward!)\n\nUse `a/ itemname redeem` to buy or `a/ info itemname` to get item info"))
# PREFERENCE
if message.content.startswith("a/ add ticketmgr") or message.content.startswith("a/add ticketmgr") or message.content.startswith("a/ ticketmgr add") or message.content.startswith("a/ticketmgr add") or message.content.startswith("a/ add ticketmanager") or message.content.startswith("a/add ticketmanager") or message.content.startswith("a/ ticketmanager add") or message.content.startswith("a/ticketmanager add"):
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
if message.author.guild_permissions.administrator:
tif = await message.channel.send(embed=discord.Embed(title="Adding... <a:ag_ldingwin:781410586138902529>", color=0x09BEFC))
roleid = fetch_data(message.content)
roleid = roleid.split(r"<@&")[1]
roleid = roleid.split(r">")[0]
srvdic = collection.find_one({"_id": int(message.guild.id)})
try:
rolelst = srvdic["ticketroleid"]
except:
rolelst = []
if len(rolelst) >= 2:
await tif.edit(embed=discord.Embed(title="Slots Full", description=f"Neither you nor your server is not Premium, so you can add maximum of 2 roles only. \n For help about premium and premium features Please use `a/ premium`", color=0x2AE717))
elif (int(roleid) in rolelst) or (str(roleid) in rolelst):
await tif.edit(embed=discord.Embed(title="Already Added", color=0x2AE717))
else:
rolelst.append(roleid)
print(roleid)
collection.update_one({"_id": int(message.guild.id)}, {"$set": {"ticketroleid": rolelst}})
await tif.edit(embed=discord.Embed(title="Added", description=f"Role: <@&{roleid}> \nRequested By : {message.author.mention}", color=0x2AE717))
else:
await message.channel.send(embed=discord.Embed(title="You Don't have Administrator Permissions <a:ag_exc:781410611366985748>", color=0xFC4905))
# await ctx.channel.set_permissions(ctx.guild.default_role, send_messages=False)
if message.content.startswith("a/ remove ticketmgr") or message.content.startswith("a/remove ticketmgr") or message.content.startswith("a/ ticketmgr remove") or message.content.startswith("a/ticketmgr remove"):
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
if message.author.guild_permissions.administrator:
tif = await message.channel.send(embed=discord.Embed(title="Removing... <a:ag_ldingwin:781410586138902529>", color=0x09BEFC))
roleid = fetch_data(message.content)
roleid = roleid.split(r"<@&")[1]
roleid = roleid.split(r">")[0]
srvdic = collection.find_one({"_id": int(message.guild.id)})
try:
rolelst = srvdic["ticketroleid"]
except:
rolelst = []
if (int(roleid) in rolelst) or (str(roleid) in rolelst):
for i in range(0, len(rolelst)):
if int(roleid) == rolelst[i]:
rolelst.pop(i)
elif str(roleid) == rolelst[i]:
rolelst.pop(i)
print(roleid)
print(rolelst)
collection.update_one({"_id": int(message.guild.id)}, {"$set": {"ticketroleid": rolelst}})
await tif.edit(embed=discord.Embed(title="Removed", description=f"Role: <@&{roleid}> \nRequested By : {message.author.mention}", color=0x2AE717))
else:
await tif.edit(embed=discord.Embed(title="Role not Found!", color=0x2AE717))
else:
await message.channel.send(embed=discord.Embed(title="You Don't have Administrator Permissions <a:ag_exc:781410611366985748>", color=0xFC4905))
if message.content == "a/ ticket enable" or message.content == "a/ ticket true" or message.content == "a/ enable ticket":
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
if message.author.guild_permissions.manage_channels:
tif = await message.channel.send(embed=discord.Embed(title="Enabling... <a:ag_ldingwin:781410586138902529>", color=0x2AE717))
srvdic = collection.find_one({"_id":1341})
srvlst = srvdic["ids"]
if int(message.guild.id) in srvlst:
await tif.edit(embed=discord.Embed(title="Already Enabled", color=0x2AE717))
else:
strgid = int(message.guild.id)
srvlst.append(strgid)
collection.update_one({"_id":1341}, {"$set":{"ids":srvlst}})
await tif.edit(embed=discord.Embed(title="Enabled", description=f"Requested By : {message.author.mention}", color=0x2AE717))
else:
await message.channel.send(embed=discord.Embed(title="You Don't have Permission to Manage Channels <a:ag_exc:781410611366985748>", color=0xFC4905))
if message.content == "a/ ticket disable" or message.content == "a/ ticket false" or message.content == "a/ disable ticket":
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
if message.author.guild_permissions.manage_channels:
tif = await message.channel.send(embed=discord.Embed(title="Disabling... <a:ag_ldingwin:781410586138902529>", color=0x2AE717))
srvdic = collection.find_one({"_id":1341})
srvlst = srvdic["ids"]
if int(message.guild.id) not in srvlst:
await tif.edit(embed=discord.Embed(title="Already Disabled", color=0x2AE717))
else:
strgid = int(message.guild.id)
srvlst.remove(strgid)
collection.update_one({"_id": 1341}, {"$set": {"ids": srvlst}})
await tif.edit(embed=discord.Embed(title="Disabled", description=f"Requested By: {message.author.mention}", color=0x2AE717))
else:
await message.channel.send(embed=discord.Embed(title="You Don't have Permission to Manage Channels <a:ag_exc:781410611366985748>", color=0xFC4905))
if message.content.find("a/ set chatmod false") != -1 or message.content.find("a/set chatmod false") != -1:
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
if message.author.guild_permissions.manage_messages:
tif = await message.channel.send(embed=discord.Embed(title="Disabling... <a:ag_ldingwin:781410586138902529>", color=0x2AE717))
gid = int(message.guild.id)
fin = collection.find_one({"_id":gid})
if fin == None:
collection.insert({"_id":gid,"chatmod":0,"badwords":[],"moddel":0})
await tif.edit(embed=discord.Embed(title="Chat Moderation Diabled", description="Chat in this Server will **NOT** be moderated with a warn message for the words you have added using `a/ badword =<badword>`\n For more use `a/ mod help` or `a/ set help`", color=0x2AE717))
else:
collection.update_one({"_id":gid},{"$set":{"chatmod":0}})
await tif.edit(embed=discord.Embed(title="Chat Moderation Diabled", description="Chat in this Server will **NOT** be moderated with a warn message for the words you have added using `a/ badword =<badword>`\n For more use `a/ mod help` or `a/ set help`", color=0x2AE717))
else:
await message.channel.send(embed=discord.Embed(title="You Don't have Permission to Manage Messages <a:ag_exc:781410611366985748>", color=0xFC4905))
if message.content.find("a/ set chatmod true") != -1 or message.content.find("a/ set chatmod true") != -1:
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
if message.author.guild_permissions.manage_messages:
tif = await message.channel.send(embed=discord.Embed(title="Enabling... <a:ag_ldingwin:781410586138902529>", color=0x2AE717))
gid = int(message.guild.id)
fin = collection.find_one({"_id":gid})
if fin == None:
collection.insert({"_id":gid,"chatmod":1,"badwords":[],"moddel":0})
await tif.edit(embed=discord.Embed(title="Chat Moderation Enabled", description="Chat in this Server **WILL** be moderated with a warn message for the words you have added using `a/ badword =<badword>`\nIf you want to Delete AND warn pls type `a/ set delmod true`\n For more use `a/ mod help` or `a/ set help`"))
else:
collection.update_one({"_id":gid},{"$set":{"chatmod":1}})
await tif.edit(embed=discord.Embed(title="Chat Moderation Enabled", description="Chat in this Server **WILL** be moderated with a warn message for the words you have added using `a/ badword =<badword>`\nIf you want to Delete AND warn pls type `a/ set delmod true`\n For more use `a/ mod help` or `a/ set help`", color=0x2AE717))
else:
await message.channel.send(embed=discord.Embed(title="You Don't have Permission to Manage Messages <a:ag_exc:781410611366985748>", color=0xFC4905))
if message.content.find("a/ set delmod true") != -1 or message.content.find("a/ set delmod true") != -1:
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
if message.author.guild_permissions.manage_messages:
gid = int(message.guild.id)
fin = collection.find_one({"_id":gid})
if fin == None:
collection.insert({"_id":gid,"chatmod":1,"badwords":[], "moddel":1})
await message.channel.send(embed=discord.Embed(title="DelMod and Chat Moderation Enabled", description="Blacklisted words in this Server **WILL** be Deleted with a warn message for the words you have added using `a/ badword =<badword>`\n For more use `a/ mod help` or `a/ set help`", color=0x2AE717))
else:
collection.update_one({"_id":gid},{"$set":{"chatmod":1,"moddel":1}})
await message.channel.send(embed=discord.Embed(title="DelMod and Chat Moderation Enabled", description="Blacklisted words in this Server **WILL** be Deleted with a warn message for the words you have added using `a/ badword =<badword>`\n For more use `a/ mod help` or `a/ set help`", color=0x2AE717))
else:
await message.channel.send(embed=discord.Embed(title="You Don't have Permission to Manage Messages <a:ag_exc:781410611366985748>", color=0xFC4905))
if message.content == ("a/ set delmod false") or message.content == ("a/ set delmod false"):
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
if message.author.guild_permissions.manage_messages:
gid = int(message.guild.id)
fin = collection.find_one({"_id": gid})
if fin == None:
collection.insert({"_id": gid, "chatmod": 0, "badwords": [], "moddel": 0})
await message.channel.send(embed=discord.Embed(title="DelMod and Chat Modertion Disabled", description="Blacklisted words in this Server will **NOT** be deleted\nFor more use `a/ mod help` or `a/ set help`", color=0x2AE717))
else:
collection.update_one({"_id": gid}, {"$set": {"moddel": 0}})
await message.channel.send(embed=discord.Embed(title="DelMod Disabled", description="Blacklisted words in this Server will **NOT** be deleted\nFor more use `a/ mod help` or `a/ set help`", color=0x2AE717))
else:
await message.channel.send(embed=discord.Embed(title="You Don't have Permission to Manage Messages <a:ag_exc:781410611366985748>", color=0xFC4905))
# WIKIPEDIA
if message.content.find("a/ wiki ") != -1 or message.content.find("a/wiki ") != -1:
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
edmsg = await message.channel.send(embed=discord.Embed(title="Searching... <a:ag_ldingwin:781410586138902529>", color=0x09BEFC))
words = fetch_data(message.content)
wordas = words
wordas = str(wordas)
topa = ""
dups = list(words)
for i in range(0,len(dups)):
if dups[i] == " ":
topa += "+"
else:
topa += dups[i]
words = topa
wordas = wordas.upper()
def wiki_summary(arg):
definition = wikipedia.summary(arg, sentences=5, chars=1000, auto_suggest=True, redirect=True)
return definition
try:
desc = wiki_summary(words)
serch = discord.Embed(title=f"{wordas}", description=f"**Defenition According to WikiPedia:**\n{desc}", color=0x05FCB1)
await edmsg.edit(embed=serch)
except Exception as e:
await edmsg.edit(embed=discord.Embed(title="Page Not Found", description=f"**Possible Reasons:**\n<a:ag_arrowgif:781395494127271947> The Keyword **{words}** did not Match any Pages\n<a:ag_arrowgif:781395494127271947> My Ping or Latency is High, check using `a/ ping`\n<a:ag_arrowgif:781395494127271947> WikiPedia's Server is Down or not Responding", color=0xFC8C05))
# URBAN DICTIONARY
if message.content.startswith('a/ dic ') or message.content.startswith("a/dic ") or message.content.startswith("a/ def ") or message.content.startswith("a/def "):
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
eddic = await message.channel.send(embed=discord.Embed(title='Searching... <a:ag_ldingwin:781410586138902529>', color=0x09BEFC))
dicsr = fetch_data(message.content)
url = f"https://api.urbandictionary.com/v0/define?term={dicsr}"
response = json.loads(requests.get(url).content)
a = (response['list'])
b = a[0]
c = b['definition']
d = b['example']
thup = b['thumbs_up']
thdo = b['thumbs_down']
try:
dicsr = dicsr.upper()
except Exception as e:
print(e)
dicem = discord.Embed(title=f'{dicsr}', description=f'__Definition__: {c}\nExample: {d}', color=0x02BDFE)
dicem.set_footer(text=f"👍 : {thup}, 👎 : {thdo}")
await eddic.edit(embed=dicem)
# Image search
if message.content.startswith("a/image ") or message.content.startswith("a/ image "):
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
try:
msgcontent = message.content.split(' ')
imgsearchterm = ""
try:
for i in range(2,len(msgcontent)):
imgsearchterm += f"{msgcontent[i]} "
except:
pass
if msgcontent != "":
class AppURLopener(urllib.request.FancyURLopener):
version = "Mozilla/5.0"
opener = AppURLopener()
htmldata = opener.open(f'https://www.dogpile.com/serp?q={imgsearchterm}&sc=wUtDg1W2On4R20')
imagesoup = bs4.BeautifulSoup(htmldata, 'html.parser')
images = imagesoup.find_all('img')
add = images[random.choice([1,2,3,4,5,6,7,8,9,0])]
imgurl = add["src"]
imgmbd = discord.Embed(title=f"Image for **{imgsearchterm}**", color=0x02BDFE)
imgmbd.set_image(url=f"{imgurl}")
imgmbd.set_footer(text=f"Requested by : {message.author}", icon_url=f"{message.author.avatar_url}")
await message.channel.send(embed=imgmbd)
else:
await message.content.send(embed=discord.Embed(title="Enter a term to search!!", color=0xFB1F1F))
except Exception as e:
print(e)
await message.channel.send(embed=discord.Embed(title="An error Occurred", description="If this occurs again and again Please Report to [Support Server](https://discord.gg/teszgSR9yK)", color=0xFB1F1F))
# RANDOM FACTS
if message.content.startswith("a/ fact") or message.content.startswith("a/ random fact") or message.content.startswith("a/fact") or message.content.startswith("a/random fact"):
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
factfile = open("fact.txt", "r", encoding="utf8")
rndmfctlst = factfile.readlines()
factfile.close()
randnumf = random.randint(0, len(rndmfctlst))
rndmfct = rndmfctlst[randnumf]
await message.channel.send(embed=discord.Embed(title=f"{rndmfct} Fact ID: {randnumf}", description=f"Care has been taken to give a quality fact but If you find any inappropriate or unwanted or offensive or nsfw content above just remember the fact ID(Fact ID: **{randnumf}**) and please send it to us using a suggestion(`a/ suggest help`) or a message in our [Support Server](https://discord.gg/teszgSR9yK) and that sentence will be removed and you will be awarded AstroCash. Sorry for the inconvenience.", color=0x02BDFE))
# DeCAN
if message.content.startswith("a/ decan") or message.content.startswith("a/decan"):
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
if message.author.guild_permissions.manage_nicknames:
try:
target = message.mentions[0]
naaame = str(target)
namelst = list(naaame)
naaame = ""
splchardic = {"ᴷ": "K", "ᴺ": "N", '『': '(', '』': ')', '𝑀': 'M', '𝒫': 'P', '𝒮': 'S', '𝒴': 'Y', '𝒞': 'C', '𝐻': 'H', '𝒪': 'O', "ᴅ": "D", "ᴇ": "E", 'B': 'B', 'O': 'O', 'S': 'S', "〃": ".", "м": "M", '◉': 'O', 'ᴳ': 'G', 'ˣ': 'X', 'ᵘ': 'u', 'N': 'N', 'A': 'A', 'R': 'R', 'H': 'H', 'C': 'C', '🅼': 'M', '🅰': 'C', '🅻': 'L', '🆂': 'S', '🅷': 'H', '𝖎': 'i', '𝖍': 'h', '𝖘': 's', '𝖗': 'r', '𝑹': 'R', '𝑬': 'E', '𝑫': 'D', '𝑼': 'U', '𝑯': 'H', '𝑻': 'T', 'ɪ': 'I', 'ᴠ': 'V', 'ʜ': 'H', 'ᴛ': 'T', 'ʀ': 'R', 'ᴘ': 'P', 'I': 'I', 'T': 'T', 'K': 'K', 'є': 'e', 'я': 'R', 'α': 'a', 'ʑ': 'z', 'ℓ': 'l',"𝒄":"c", "𝒌":"k", 'ι': 'l', 'Z': 'Z', 'Ƭ': 'T', "𝒋":"j", "𝒂":"a", '~': '-', "Ѧ":"A", "₊":",", "⋆":".", "𒆜":"X","Ѵ":"V", "Ǥ":"G", "Л":"N", "Σ":"E", "$":"S","Ƕ":"H", "ᵉ":"e", "ᵛ":"v", "⎰":"/", "⎱":"\\", "⎝":"\\", "⧹":"\\", "⧸":"/", "⎠":"/", "™":"tm", "𝑩":"B", "𝑵":"N", "𝑮":"G", "ᴰ":"D", "ᴱ":"E", "ⱽ":"V", "Ξ":"E"}
for i in range(0, len(namelst)-5):
if namelst[i] in ['!', '"', '#', '$', '%', '&', "'", '(', ')', '*', '+', ',', '-', '.', '/', ':', ';', '<', '=', '>', '?', '@', '[', '\\', ']', '_', '`', '{', '|', '}', ' ', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']:
naaame += namelst[i]
elif namelst[i] in splchardic:
naaame += splchardic[namelst[i]]
else:
ranchn = random.choice(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])
naaame += ranchn
await target.edit(nick=f"{naaame}")
await message.channel.send(embed=discord.Embed(title="Name has been DEcancered :microbe:", description=f"{target.mention}", color=0xFD4201))
except Exception as e:
await message.channel.send(embed=discord.Embed(title="<a:ag_exc:781410611366985748> Error Occured <a:ag_exc:781410611366985748>", description=f"__Possible Reason__:\n<a:ag_arrowgif:781395494127271947> You Did not mention someone\n<a:ag_arrowgif:781395494127271947> I Don't have Manage Nickname Permissions\n<a:ag_arrowgif:781395494127271947> Person mentioned has a Higher Role than Me\n\nError:{e}", color=0xFD4201))
else:
await message.channel.send(embed=discord.Embed(title="You do not have Manage Nickname permissions"))
# WEATHER
if (message.content.startswith("a/ weather ") or message.content.startswith("a/weather ")) and not (message.content.startswith("a/ weather help") or message.content.startswith("a/weather help")):
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
wethd = await message.channel.send(embed=discord.Embed(title="Searching... <a:ag_ldingwin:781410586138902529>", color=0x09BEFC))
location = fetch_data(message.content)
if len(location) >= 2:
url = f"http://api.openweathermap.org/data/2.5/weather?q={location}&appid={wthapikey}&units=metric"
data = json.loads(requests.get(url).content)
data = str(data)
# {'coord': {'lon': 80.28, 'lat': 13.09}, 'weather': [{'id': 301, 'main': 'Drizzle', 'description': 'drizzle', 'icon': '09d'},
# {'id': 500, 'main': 'Rain', 'description': 'light rain', 'icon': '10d'}],
# 'base': 'stations', 'main': {'temp': 27, 'feels_like': 31.85, 'temp_min': 27, 'temp_max': 27, 'pressure': 1008, 'humidity': 94},
# 'visibility': 3000, 'wind': {'speed': 3.1, 'deg': 40}, 'rain': {'1h': 0.27}, 'clouds': {'all': 90},
# 'dt': 1607074808, 'sys': {'type': 1, 'id': 9218, 'country': 'IN', 'sunrise': 1607042849, 'sunset': 1607083870}, 'timezone': 19800,
# 'id': 1264527, 'name': 'Chennai', 'cod': 200}
if data.split("'")[-2] == "city not found":
await message.channel.send(embed=discord.Embed(title=f"City {location} Not Found", description="Your Requested City Is not Found Sorry!", color=0xFC5F05))
lon = data.split(":")[2]
lon = lon.split(",")[0]
lat = data.split(":")[3]
lat = lat.split("}")[0]
stat = data.split(":")[6]
stat = stat.split("'")[1]
emoj = ":sunny:"
if stat == "Drizzle":
emoj = ":white_sun_rain_cloud:"
if stat == "Rain":
emoj = ":cloud_rain:"
if stat == "Clouds":
emoj = ":cloud:"
if stat == "Mist":
emoj = "<:mistop:784711272369225728>"
if stat == "Smoke":
emoj = ":anger_right:"
if stat == "Snow":
emoj = ":snowflake:"
if stat == "Haze":
emoj = ":white_sun_cloud:"
temp = data.split("temp")[1]
temp = temp.split(",")[0]
temp = temp.split(":")[1]
feels = data.split("feels_like':")[1]
feels = feels.split(",")[0]
mintem = data.split("temp_min':")[1]
mintem = mintem.split(",")[0]
maxtem = data.split("temp_max':")[1]
maxtem = maxtem.split(',')[0]
press = data.split("pressure':")[1]
press = press.split(',')[0]
humid = data.split("humidity':")[1]
humid = humid.split("}")[0]
visib = data.split("visibility':")[1]
visib = visib.split(',')[0]
wndspd = data.split("speed':")[1]
wndspd = wndspd.split(",")[0]
snrtim = data.split("sunrise':")[1]
snrtim = snrtim.split(",")[0]
snrtim = datetime.datetime.utcfromtimestamp(int(snrtim)).strftime('%Y-%m-%d %H:%M:%S')
snttim = data.split("sunset':")[1]
snttim = snttim.split("}")[0]
snttim = datetime.datetime.utcfromtimestamp(int(snttim)).strftime('%Y-%m-%d %H:%M:%S')
await wethd.edit(embed=discord.Embed(title=f"{location} Weather Report\n▬▬▬▬▬▬▬▬▬▬", description=f"{emoj}{emoj}{emoj}{emoj}{emoj}{emoj}\n<a:ag_arrowgif:781395494127271947> Longitide : {lon}\n<a:ag_arrowgif:781395494127271947> Latitude\
: {lat}\n<a:ag_arrowgif:781395494127271947> Status : {stat}\n<a:ag_arrowgif:781395494127271947> Temperature : {temp}\n<a:ag_arrowgif:781395494127271947> Feels Like : {feels}\n<a:ag_arrowgif:781395494127271947> Minimum Temperature : {mintem}\n<a:ag_arrowgif:781395494127271947> Maximum Temperature : {maxtem}\n<a:ag_arrowgif:781395494127271947> Pressure : {press}\n<a:ag_arrowgif:781395494127271947> Humidity : {humid}\n<a:ag_arrowgif:781395494127271947> Wind Speed : {wndspd}", color=0x057DFC))
else:
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
await wethd.edit(embed=discord.Embed(title="Invalid Location <a:ag_exc:781410611366985748>", description="Enter a Valid Location", color=0xFC5F05))
# SYSTEM STATS
if message.content.startswith("a/ cpu") or message.content.startswith("a/cpu"):
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
try:
cpupert = "Error"
cpun = "Error"
cpusw = "Error"
cpupers = "Error"
except Exception as e:
print(e)
try:
cpui = "Error"
cpui = "Error"
cpui = "Error"
cpui = "Error"
cpui = "Error"
cpui = "Error"
cpuppp = "Error"
except Exception as e:
print(e)
try:
cpusw = "Error"
cpuswt = "Error"
cpuswt = "Error"
cpuswt = "Error"
cpuswt = "Error"
cpuswt = "Error"
cpuswt = "Error"
except Exception as e:
print(e)
try:
cpusw = "Error"
cpuswu = "Error"
cpuswu = "Error"
cpuswu = "Error"
cpuswu = "Error"
cpuswu = "Error"
cpuswu = "Error"
except Exception as e:
print(e)
try:
cpusw = "Error"
cpuswf = "Error"
cpuswf ="Error"
cpuswf = "Error"
cpuswf = "Error"
cpuswf = "Error"
cpuswf = "Error"
except Exception as e:
print(e)
try:
cpusw = "Error"
cpuswp = "Error"
cpuswp = "Error"
except Exception as e:
print(e)
try:
sysarch = "Error"
nodsds = "Error"
sysmchn = "Error"
except Exception as e:
pass
try:
dist = "Error"
dist = "Error"
except Exception as e:
print(e)
try:
lines = "Error"
meminf1 = "Error"
meminf2 = "Error"
info = "Error"
except Exception as e:
print(e)
try:
syscpumo = "Error"
cpuinfo = "Error"
syscpumo = "Error"
except Exception as e:
print(e)
try:
uptime = "Error"
uptime = "Error"
uptime = "Error"
uptime_hours = "Error"
uptime_minutes = "Error"
servuptime = "Error"
except Exception as e:
print(e)
try:
avgload = "Error"
sysspd = "Error"
except Exception as e:
print(e)
if str(platform.system()) != "":
try:
cpupert = psutil.cpu_percent()
cpun = psutil.cpu_count()
cpusw = psutil.swap_memory()
cpupers = psutil.cpu_percent(percpu=1)
except Exception as e:
print(e)
try:
cpui = psutil.cpu_freq()
cpui = str(cpui)
cpui = cpui.split("=")[-1]
cpui = cpui.split(")")[0]
cpui = float(cpui)
cpui = cpui / 1000
cpuppp = ""
print("printing hereeeeee: ", cpupers)
for i in range(len(cpupers)):
cpuo = cpupers[int(i)]
cpuppp += f"Core{int(i)}: {cpuo}%\n"
except Exception as e:
print(e)
try:
cpusw = str(cpusw)
cpuswt = cpusw.split("=")[1]
cpuswt = cpuswt.split(",")[0]
cpuswt = float(cpuswt)
cpuswt = cpuswt/10000000
cpuswt = math.floor(cpuswt)
cpuswt = cpuswt/100
except Exception as e:
print(e)
try:
cpusw = str(cpusw)
cpuswu = cpusw.split("=")[2]
cpuswu = cpuswu.split(",")[0]
cpuswu = float(cpuswu)
cpuswu = cpuswu / 10000000
cpuswu = math.floor(cpuswu)
cpuswu = cpuswu / 100
except Exception as e:
print(e)
try:
cpusw = str(cpusw)
cpuswf = cpusw.split("=")[3]
cpuswf = cpuswf.split(",")[0]
cpuswf = float(cpuswf)
cpuswf = cpuswf / 10000000
cpuswf = math.floor(cpuswf)
cpuswf = cpuswf / 100
except Exception as e:
print(e)
try:
cpusw = str(cpusw)
cpuswp = cpusw.split("=")[4]
cpuswp = cpuswp.split(",")[0]
except Exception as e:
print(e)
try:
sysarch = platform.architecture()[0]
nodsds = platform.node()
sysmchn = platform.system()
except Exception as e:
pass
try:
dist = platform.dist()
dist = " ".join(x for x in dist)
except Exception as e:
print(e)
try:
with open("/proc/meminfo", "r") as f:
lines = f.readlines()
meminf1 = (" " + lines[0].strip())
meminf2 = (" " + lines[1].strip())
with open("/proc/cpuinfo", "r") as f:
info = f.readlines()
except Exception as e:
print(e)
try:
syscpumo = "Error"
cpuinfo = [x.strip().split(":")[1] for x in info if "model name" in x]
for index, item in enumerate(cpuinfo):
syscpumo = (" " + str(index) + ": " + item)
except Exception as e:
print(e)
try:
uptime = None
with open("/proc/uptime", "r") as f:
uptime = f.read().split(" ")[0].strip()
uptime = int(float(uptime))
uptime_hours = uptime // 3600
uptime_minutes = (uptime % 3600) // 60
servuptime = ("Uptime: " + str(uptime_hours) + ":" + str(uptime_minutes) + " hours")
except Exception as e:
print(e)
try:
with open("/proc/loadavg", "r") as f:
avgload = ("Average Load: " + f.read().strip())
sysspd = syscpumo.split(" ")[-1]
except Exception as e:
print(e)
await message.channel.send(embed=discord.Embed(title="CPU STATS :tools:", description=f"\nNode: {nodsds}\nServer Load: {avgload}\n**Processor**\nArchitecture: {sysarch}\nModel: {syscpumo}\nCores = {cpun}\nSpeed = {sysspd} Ghz\nTotal Usage = {cpupert}%\n{cpuppp}\n\nOS: {sysmchn}\nDist: {dist}\n\nDisk:\nTotal: {meminf1}\nFree: {meminf2}\n\n**RAM**\nTotal = {cpuswt} Gb\nUsed = {cpuswu} Gb\nPercentage = {cpuswp}%\nFree = {cpuswf} Gb\n\nServer {servuptime}", color=0xFD9E01))
# DATE TIME
if message.content.find("a/ time") != -1 or message.content.find("a/time") != -1:
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
time = datetime.datetime.now()
time = str(time)
time = time.split()[-1]
time = time.split('.')[0]
await message.channel.send(embed=discord.Embed(title=f"{time}", description="The Time NOW According to My server", color=0x05ADFC))
if message.content.find("a/ date") != -1 or message.content.find("a/date") != -1:
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
date = datetime.datetime.now()
date = str(date)
date = date.split()[0]
await message.channel.send(embed=discord.Embed(title=f"{date}", description="Date Today According to My server", color=0x05ADFC))
# EVAL
if message.content.find("a/ eval ^") != -1 and message.author.id == 782624720989585409:
ncmnda(), await message.add_reaction("<a:ag_flyn_hrts_cyn:781395468978356235>")
ecol = message.content.split('^')[-1]
opt = eval(ecol)
await message.channel.send(embed=discord.Embed(title=f"{opt}", description=f"Evauated by {message.author}"))