-
Notifications
You must be signed in to change notification settings - Fork 0
/
BingBot.py
772 lines (703 loc) · 43.4 KB
/
BingBot.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
import discord
from discord.ext import commands
import discord_self_embed
import requests
import os
import shutil
from playsound import playsound
import time
import json
import asyncio
from discord import Webhook, RequestsWebhookAdapter, Embed
from datetime import datetime
import subprocess
import math
import sys
from dotenv import load_dotenv
import pytz
from pytz import timezone
import random
""""
MAKING AN ATTEMPT TO ADD OR REMOVE FROM THE CODE MAY RESULT IN THE BREAKING OF THE SCRIPT. IF YOU HAVE ANY FURTHER QUESTIONS
PLEASE CONTACT ME VIA DISCORD: https://discord.gg/Nh6wgyfAPR.
GITHUB REPOSITORY: https://github.com/itsb1ng/BingBot-Self-Bot
"""
load_dotenv()
with open("config.json", "r") as f:
config = json.load(f)
DISCORD_TOKEN = config[0]['discord_token']
PREFIX = config[0]['prefix']
DM_WEBHOOK = config[0]['dm_webhook']
API_KEY = config[0]['api_key']
STATUS = config[0]['discord_status']
NITRO_WEBHOOK = config[0]["nitro_webhook"]
EMBED_MODE = config[0]['embed_mode']
if PREFIX == "":
PREFIX == "b!"
bing = commands.Bot(command_prefix=PREFIX, self_bot=True)
try:
global width
width = os.get_terminal_size().columns
def startup(setting):
print()
print()
if setting.lower() == "standard" or setting == "":
print("██████╗ ██╗███╗ ██╗ ██████╗ ██████╗ ██████╗ ████████╗".center(width))
print("██╔══██╗██║████╗ ██║██╔════╝ ██╔══██╗██╔═══██╗╚══██╔══╝".center(width))
print("██████╔╝██║██╔██╗ ██║██║ ███╗██████╔╝██║ ██║ ██║ ".center(width))
print("██╔══██╗██║██║╚██╗██║██║ ██║██╔══██╗██║ ██║ ██║ ".center(width))
print("██████╔╝██║██║ ╚████║╚██████╔╝██████╔╝╚██████╔╝ ██║ ".center(width))
print("╚═════╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ".center(width))
elif setting.lower() == "3d":
print(r"________ ___ ________ ________ ________ ________ _________ ".center(width))
print(r"|\ __ \|\ \|\ ___ \|\ ____\|\ __ \|\ __ \|\___ ___\ ".center(width))
print(r"\ \ \|\ /\ \ \ \ \\ \ \ \ \___|\ \ \|\ /\ \ \|\ \|___ \ \_| ".center(width))
print(r" \ \ __ \ \ \ \ \\ \ \ \ \ __\ \ __ \ \ \\\ \ \ \ \ ".center(width))
print(r" \ \ \|\ \ \ \ \ \\ \ \ \ \|\ \ \ \|\ \ \ \\\ \ \ \ \ ".center(width))
print(r" \ \_______\ \__\ \__\\ \__\ \_______\ \_______\ \_______\ \ \__\ ".center(width))
print(r" \|_______|\|__|\|__| \|__|\|_______|\|_______|\|_______| \|__|".center(width))
elif setting.lower() == "pointed":
print(r"▀█████████▄ ▄█ ███▄▄▄▄ ▄██████▄ ▀█████████▄ ▄██████▄ ███ ".center(width))
print(r" ███ ███ ███ ███▀▀▀██▄ ███ ███ ███ ███ ███ ███ ▀█████████▄ ".center(width))
print(r" ███ ███ ███▌ ███ ███ ███ █▀ ███ ███ ███ ███ ▀███▀▀██ ".center(width))
print(r" ▄███▄▄▄██▀ ███▌ ███ ███ ▄███ ▄███▄▄▄██▀ ███ ███ ███ ▀ ".center(width))
print(r"▀▀███▀▀▀██▄ ███▌ ███ ███ ▀▀███ ████▄ ▀▀███▀▀▀██▄ ███ ███ ███ ".center(width))
print(r" ███ ██▄ ███ ███ ███ ███ ███ ███ ██▄ ███ ███ ███ ".center(width))
print(r" ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ".center(width))
print(r"▄█████████▀ █▀ ▀█ █▀ ████████▀ ▄█████████▀ ▀██████▀ ▄████▀ ".center(width))
elif setting.lower() == "money":
print(r"$$$$$$$\ $$$$$$\ $$\ $$\ $$$$$$\ $$$$$$$\ $$$$$$\ $$$$$$$$\ ".center(width))
print(r"$$ __$$\ \_$$ _|$$$\ $$ |$$ __$$\ $$ __$$\ $$ __$$\\__$$ __|".center(width))
print(r"$$ | $$ | $$ | $$$$\ $$ |$$ / \__|$$ | $$ |$$ / $$ | $$ | ".center(width))
print(r"$$$$$$$\ | $$ | $$ $$\$$ |$$ |$$$$\ $$$$$$$\ |$$ | $$ | $$ | ".center(width))
print(r"$$ __$$\ $$ | $$ \$$$$ |$$ |\_$$ |$$ __$$\ $$ | $$ | $$ | ".center(width))
print(r"$$ | $$ | $$ | $$ |\$$$ |$$ | $$ |$$ | $$ |$$ | $$ | $$ | ".center(width))
print(r"$$$$$$$ |$$$$$$\ $$ | \$$ |\$$$$$$ |$$$$$$$ | $$$$$$ | $$ | ".center(width))
print(r"\_______/ \______|\__| \__| \______/ \_______/ \______/ \__| ".center(width))
elif setting.lower() == "blocks":
print(r" .----------------. .----------------. .-----------------. .----------------. .----------------. .----------------. .----------------. ".center(width))
print(r"| .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. |".center(width))
print(r"| | ______ | || | _____ | || | ____ _____ | || | ______ | || | ______ | || | ____ | || | _________ | |".center(width))
print(r"| | |_ _ \ | || | |_ _| | || ||_ \|_ _| | || | .' ___ | | || | |_ _ \ | || | .' `. | || | | _ _ | | |".center(width))
print(r"| | | |_) | | || | | | | || | | \ | | | || | / .' \_| | || | | |_) | | || | / .--. \ | || | |_/ | | \_| | |".center(width))
print(r"| | | __'. | || | | | | || | | |\ \| | | || | | | ____ | || | | __'. | || | | | | | | || | | | | |".center(width))
print(r"| | _| |__) | | || | _| |_ | || | _| |_\ |_ | || | \ `.___] _| | || | _| |__) | | || | \ `--' / | || | _| |_ | |".center(width))
print(r"| | |_______/ | || | |_____| | || ||_____|\____| | || | `._____.' | || | |_______/ | || | `.____.' | || | |_____| | |".center(width))
print(r"| | | || | | || | | || | | || | | || | | || | | |".center(width))
print(r"| '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' || '--------------' |".center(width))
print(r" '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' '----------------' ".center(width))
elif setting.lower() == "graffiti":
print(r"__________.___ _______ __________________ ___________________".center(width))
print(r"\______ \ |\ \ / _____/\______ \\_____ \__ ___/".center(width))
print(r" | | _/ |/ | \/ \ ___ | | _/ / | \| | ".center(width))
print(r" | | \ / | \ \_\ \| | \/ | \ | ".center(width))
print(r" |______ /___\____|__ /\______ /|______ /\_______ /____| ".center(width))
print(r" \/ \/ \/ \/ \/ ".center(width))
elif setting.lower() == "slant":
print(r" ______ __ __ __ ______ ______ ______ ______ ".center(width))
print(r'/\ == \ /\ \ /\ "-.\ \ /\ ___\ /\ == \ /\ __ \ /\__ _\ '.center(width))
print(r"\ \ __< \ \ \ \ \ \-. \ \ \ \__ \ \ \ __< \ \ \/\ \ \/_/\ \/ ".center(width))
print(r' \ \_____\ \ \_\ \ \_\\"\_\ \ \_____\ \ \_____\ \ \_____\ \ \_\ '.center(width))
print(r" \/_____/ \/_/ \/_/ \/_/ \/_____/ \/_____/ \/_____/ \/_/ ".center(width))
else:
print("██████ ██ ███ ██ ██████ ██████ ██████ ████████ ".center(width))
print("██ ██ ██ ████ ██ ██ ██ ██ ██ ██ ██ ".center(width))
print("██████ ██ ██ ██ ██ ██ ███ ██████ ██ ██ ██ ".center(width))
print("██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ".center(width))
print("██████ ██ ██ ████ ██████ ██████ ██████ ██ ".center(width))
print("Created by bing#0001".center(width))
def song(song):
if song == "start":
playsound(r"sounds\startup.mp3")
elif song == "dm":
playsound(r"sounds\dmsound.mp3")
elif song == "failedlogin":
playsound(r"sounds\failedlogin.mp3")
elif song == ("nitro"):
playsound(r"sounds\nitronotification.mp3")
def getInfo(call):
r = requests.get(call)
return r.json()
def bing_restart():
python = sys.executable
os.execl(python, python, * sys.argv)
@bing.event
async def on_connect():
print(f"Logged in as: {bing.user}\n")
song("start")
if STATUS.lower() == "dnd":
await bing.change_presence(status=discord.Status.dnd)
elif STATUS.lower() == "idle":
await bing.change_presence(status=discord.Status.idle)
else:
await bing.change_presence(status=discord.Status.online)
@bing.event
async def on_message(message):
if message.author.id == bing.user.id:
with open("commands.txt", "r") as f:
coms = f.readlines()
cmds = []
for x in coms:
cmds.append(x.split(" ")[0])
for command in cmds:
if f"{PREFIX}{command}" in message.content:
try:
await message.delete()
print("Command: " + message.content)
ctx = await bing.get_context(message)
await bing.invoke(ctx)
except:
pass
if (message.author.id != bing.user.id) and ("https://discord.gift/" in message.content):
if (config[1]['nitro'] == "on"):
try:
content = message.content.split(" ")
for item in content:
if "https://discord.gift/" in item:
GIFT_LINK = item
song("nitro")
print(f"\nNitro Sniped: {message.author}\n")
if NITRO_WEBHOOK != "":
try:
webhook = Webhook.from_url(NITRO_WEBHOOK, adapter=RequestsWebhookAdapter())
embed = discord.Embed(title="Nitro Gift", color=0xC98FFC)
embed.add_field(name="User:",value=message.author,inline=False)
embed.add_field(name="Link:",value=GIFT_LINK,inline=False)
MSG_LINK = message.jump_url
embed.add_field(name="Go To Message:",value=f"[Message Link]({MSG_LINK})",inline=False)
embed.set_thumbnail(url="https://static.roundme.com/upload/user/d30750eda6c30bba9295ad629961420555c05496.png")
embed.set_footer(text="BingBot Self-Bot", icon_url="https://i.imgur.com/sKwqOXE.png")
webhook.send(embed=embed)
except:
pass
except:
pass
if (message.author.id != bing.user.id) and (message.channel.type is discord.ChannelType.private):
if DM_WEBHOOK != "":
try:
webhook = Webhook.from_url(DM_WEBHOOK, adapter=RequestsWebhookAdapter())
embed = discord.Embed(title="Received DM", color=0xC98FFC)
embed.add_field(name="User:",value=message.author,inline=False)
embed.add_field(name="User ID:",value=message.author.id,inline=False)
est = timezone('EST')
time= datetime.now(est)
hour = int(time.strftime("%H")) + 1
if hour > 12:
hour -= 12
embed.add_field(name="Received:",value=time.strftime(f"%A, %B %d %Y @ {hour}:%M %p EST"),inline=False)
embed.set_thumbnail(url="https://i.imgur.com/sKwqOXE.png")
embed.set_footer(text="BingBot Self-Bot", icon_url="https://i.imgur.com/sKwqOXE.png")
song("dm")
print(f"Received Direct Message: {message.author}")
webhook.send(embed=embed)
except:
pass
@bing.command()
async def commands(ctx):
with open("commands.txt", "r") as f:
cmds = f.readlines()
commands_list = []
for x in cmds:
commands_list.append(x.split(" ")[0])
commands_str = "\n".join(commands_list)
if EMBED_MODE.lower() == "on":
embed = discord_self_embed.Embed("Available Commands:",description=commands_str,colour="C98FFC",url="https://github.com/itsb1ng/BingBot-Self-Bot")
embed.set_author(ctx.author.display_name)
url = embed.generate_url(hide_url=True)
await ctx.send(url)
else:
await ctx.send(f"```\n\tAvailable Commands:\n{commands_str}\n```")
@bing.command()
async def pornhub(ctx, firstword, secondword):
image = requests.get(f"https://logohub.appspot.com/{firstword}-{secondword}-120.webp?scheme=white&transparent=true&padding=0", stream=True)
if image.status_code == 200:
image.raw.decode_content = True
with open("image.png",'wb') as f:
shutil.copyfileobj(image.raw, f)
file = discord.File("image.png", filename="image.png")
await ctx.send(file=file)
os.remove("image.png")
@bing.command()
async def servers(ctx):
await ctx.send(f"{bing.user} is currently in {len(bing.guilds)} Discord Servers")
@bing.command()
async def friends(ctx):
await ctx.send(f"{bing.user} currently has {len(bing.user.friends)} Users Friended")
@bing.command()
async def selfpurge(ctx, num):
time.sleep(1)
messagehistory = await ctx.channel.history(limit=int(num)).flatten()
messagesdeleted = 0
for message in messagehistory:
if message.author.id == bing.user.id:
try:
messagesdeleted+=1
await message.delete()
await asyncio.sleep(2)
except:
pass
if EMBED_MODE.lower() == "on":
embed = discord_self_embed.Embed(f"You have deleted {messagesdeleted} messages",colour="C98FFC",url="https://github.com/itsb1ng/BingBot-Self-Bot")
url = embed.generate_url(hide_url=True)
await ctx.send(url)
else:
await ctx.send(f"`You have deleted {messagesdeleted} messages`")
@bing.command()
async def hypixelstats(ctx, name):
try:
user_name = requests.get(f"https://api.mojang.com/users/profiles/minecraft/{name}").json()
uuid = user_name["id"]
link = f"https://api.hypixel.net/player?key={API_KEY}&uuid={uuid}"
data = getInfo(link)
rank = data['player']['newPackageRank']
if "_" in rank:
rank = rank.replace("_PLUS","+")
if "MVP" in rank:
if data['player']['monthlyPackageRank'] != "NONE":
rank = rank + "+"
level = ((math.sqrt(data['player']['networkExp'] + 15312.5) - (125/math.sqrt(2))) / 25 * math.sqrt(2)) / 2
if EMBED_MODE.lower() == "on":
embed = discord_self_embed.Embed(f"{name}'s Hypixel Statistics",description="Hypixel Rank: {}\nKarma: {:,}\nNetwork XP: {:,.2f}\nHypixel Level: {:.2f}".format(rank, data['player']['karma'], data['player']['networkExp'], level),colour="C98FFC",url="https://github.com/itsb1ng/BingBot-Self-Bot")
url = embed.generate_url(hide_url=True)
await ctx.send(f"{url}\nhttps://crafatar.com/renders/body/{uuid}")
else:
await ctx.send("```\n\t\t{}'s Hypixel Statistics:\nHypixel Rank: {}\nKarma: {:,}\nNetwork XP: {:,.2f}\nHypixel Level: {:.2f}\n```\nhttps://crafatar.com/renders/body/{}".format(name, rank, data['player']['karma'], data['player']['networkExp'], level, uuid))
except:
if EMBED_MODE.lower() == "on":
embed = discord_self_embed.Embed(f"Error: Invalid IGN or API Key",colour="C98FFC",url="https://github.com/itsb1ng/BingBot-Self-Bot")
url = embed.generate_url(hide_url=True)
await ctx.send(url)
else:
await ctx.send("```\nError:\nInvalid IGN\n```")
@bing.command()
async def skills(ctx, name):
if API_KEY != "":
try:
user_name = requests.get(f"https://api.mojang.com/users/profiles/minecraft/{name}").json()
uuid = user_name["id"]
profile_link = f"https://api.hypixel.net/skyblock/profiles?key={API_KEY}&uuid={uuid}"
sb_data = getInfo(profile_link)
link = f"https://api.hypixel.net/player?key={API_KEY}&uuid={uuid}"
data = getInfo(link)
senither = f"https://hypixel-api.senither.com/v1/profiles/{uuid}?key={API_KEY}"
senither_data = getInfo(senither)
save = 9999999999999999999
for x in range(0, len(sb_data['profiles'])):
for y in sb_data['profiles'][x]['members']:
if uuid == y:
difference = time.time() - sb_data['profiles'][x]['members'][y]['last_save']
if difference < save:
save = sb_data['profiles'][x]['members'][y]['last_save']
profile_id = sb_data['profiles'][x]['profile_id']
for z in range(0,len(senither_data['data'])):
if senither_data['data'][z]['id'] == profile_id:
profile_num = z
profile_name = data['player']['stats']['SkyBlock']['profiles'][profile_id]["cute_name"]
def farming():
try:
senither_data['data'][profile_num]['skills']['farming']['level']
return senither_data['data'][profile_num]['skills']['farming']['level']
except:
return 0
def mining():
try:
senither_data['data'][profile_num]['skills']['mining']['level']
return senither_data['data'][profile_num]['skills']['mining']['level']
except:
return 0
def combat():
try:
senither_data['data'][profile_num]['skills']['combat']['level']
return senither_data['data'][profile_num]['skills']['combat']['level']
except:
return 0
def foraging():
try:
senither_data['data'][profile_num]['skills']['foraging']['level']
return senither_data['data'][profile_num]['skills']['foraging']['level']
except:
return 0
def fishing():
try:
senither_data['data'][profile_num]['skills']['fishing']['level']
return senither_data['data'][profile_num]['skills']['fishing']['level']
except:
return 0
def enchanting():
try:
senither_data['data'][profile_num]['skills']['enchanting']['level']
return senither_data['data'][profile_num]['skills']['enchanting']['level']
except:
return 0
def alchemy():
try:
senither_data['data'][profile_num]['skills']['alchemy']['level']
return senither_data['data'][profile_num]['skills']['alchemy']['level']
except:
return 0
def taming():
try:
senither_data['data'][profile_num]['skills']['taming']['level']
return senither_data['data'][profile_num]['skills']['taming']['level']
except:
return 0
def skill_average():
try:
senither_data['data'][profile_num]['skills']['average_skills']
return senither_data['data'][profile_num]['skills']['average_skills']
except:
return 0
if EMBED_MODE.lower() == "on":
embed = discord_self_embed.Embed(f"{name}'s Skyblock Statistics",description="Active Profile: {}\nSkill Average: {:,.1f}\nFarming: {:.0f}\nMining: {:.0f}\nCombat: {:.0f}\nForaging: {:.0f}\nFishing: {:.0f}\nEnchanting: {:.0f}\nAlchemy: {:.0f}\nTaming: {:.0f}".format(profile_name,skill_average(),farming(),mining(),combat(),foraging(),fishing(),enchanting(),alchemy(),taming()),colour="C98FFC",url="https://github.com/itsb1ng/BingBot-Self-Bot")
url = embed.generate_url(hide_url=True)
await ctx.send(f"{url}")
else:
await ctx.send("```\n\t\t{}'s Skyblock Skills:\nActive Profile: {}\nSkill Average: {:,.1f}\nFarming: {:.0f}\nMining: {:.0f}\nCombat: {:.0f}\nForaging: {:.0f}\nFishing: {:.0f}\nEnchanting: {:.0f}\nAlchemy: {:.0f}\nTaming: {:.0f}\n```".format(name,profile_name,skill_average(),farming(),mining(),combat(),foraging(),fishing(),enchanting(),alchemy(),taming()))
except:
if EMBED_MODE.lower() == "on":
embed = discord_self_embed.Embed(f"Error: Invalid IGN or API Key",colour="C98FFC",url="https://github.com/itsb1ng/BingBot-Self-Bot")
url = embed.generate_url(hide_url=True)
await ctx.send(url)
else:
await ctx.send("```\nError:\nInvalid IGN\n```")
else:
await ctx.send("`Invalid API Key`")
@bing.command()
async def weight(ctx, name):
if API_KEY != "":
try:
user_name = requests.get(f"https://api.mojang.com/users/profiles/minecraft/{name}").json()
uuid = user_name["id"]
profile_link = f"https://api.hypixel.net/skyblock/profiles?key={API_KEY}&uuid={uuid}"
sb_data = getInfo(profile_link)
link = f"https://api.hypixel.net/player?key={API_KEY}&uuid={uuid}"
data = getInfo(link)
senither = f"https://hypixel-api.senither.com/v1/profiles/{uuid}?key={API_KEY}"
senither_data = getInfo(senither)
save = 9999999999999999999
for x in range(0, len(sb_data['profiles'])):
for y in sb_data['profiles'][x]['members']:
if uuid == y:
difference = time.time() - sb_data['profiles'][x]['members'][y]['last_save']
if difference < save:
save = sb_data['profiles'][x]['members'][y]['last_save']
profile_id = sb_data['profiles'][x]['profile_id']
for z in range(0,len(senither_data['data'])):
if senither_data['data'][z]['id'] == profile_id:
profile_num = z
profile_name = data['player']['stats']['SkyBlock']['profiles'][profile_id]["cute_name"]
def weight():
try:
senither_data['data'][profile_num]['weight']
return senither_data['data'][profile_num]['weight']
except:
return 0
def overflow():
try:
senither_data['data'][profile_num]['weight_overflow']
return senither_data['data'][profile_num]['weight_overflow']
except:
return 0
def total_weight():
return overflow() + weight()
if EMBED_MODE.lower() == "on":
embed = discord_self_embed.Embed(f"{name}'s Skyblock Statistics",description="Active Profile: {}\nWeight: {:,.2f}\nOverflow Weight: {:,.2f}\nTotal Weight: {:,.2f}".format(profile_name,weight(),overflow(),total_weight()),colour="C98FFC",url="https://github.com/itsb1ng/BingBot-Self-Bot")
url = embed.generate_url(hide_url=True)
await ctx.send(f"{url}")
else:
await ctx.send("```\n\t\t{}'s Skyblock Weight:\nActive Profile: {}\nWeight: {:,.2f}\nOverflow Weight: {:,.2f}\nTotal Weight: {:,.2f}\n```".format(name,profile_name,weight(),overflow(),total_weight()))
except:
if EMBED_MODE.lower() == "on":
embed = discord_self_embed.Embed(f"Error: Invalid IGN or API Key",colour="C98FFC",url="https://github.com/itsb1ng/BingBot-Self-Bot")
url = embed.generate_url(hide_url=True)
await ctx.send(url)
else:
await ctx.send("```\nError:\nInvalid IGN\n```")
else:
await ctx.send("`Invalid API Key`")
@bing.command()
async def slayer(ctx, name):
if API_KEY != "":
try:
user_name = requests.get(f"https://api.mojang.com/users/profiles/minecraft/{name}").json()
uuid = user_name["id"]
profile_link = f"https://api.hypixel.net/skyblock/profiles?key={API_KEY}&uuid={uuid}"
sb_data = getInfo(profile_link)
link = f"https://api.hypixel.net/player?key={API_KEY}&uuid={uuid}"
data = getInfo(link)
senither = f"https://hypixel-api.senither.com/v1/profiles/{uuid}?key={API_KEY}"
senither_data = getInfo(senither)
save = 9999999999999999999
for x in range(0, len(sb_data['profiles'])):
for y in sb_data['profiles'][x]['members']:
if uuid == y:
difference = time.time() - sb_data['profiles'][x]['members'][y]['last_save']
if difference < save:
save = sb_data['profiles'][x]['members'][y]['last_save']
profile_id = sb_data['profiles'][x]['profile_id']
for z in range(0,len(sb_data['profiles'])):
if sb_data['profiles'][z]['profile_id'] == profile_id:
profile_num = z
profile_name = data['player']['stats']['SkyBlock']['profiles'][profile_id]["cute_name"]
SPIDER_XP = senither_data['data'][profile_num]['slayers']['bosses']['tarantula']['experience']
SPIDER_LVL = senither_data['data'][profile_num]['slayers']['bosses']['tarantula']['level']
REV_XP = senither_data['data'][profile_num]['slayers']['bosses']['revenant']['experience']
REV_LVL = senither_data['data'][profile_num]['slayers']['bosses']['revenant']['level']
SVEN_XP = senither_data['data'][profile_num]['slayers']['bosses']['sven']['experience']
SVEN_LVL = senither_data['data'][profile_num]['slayers']['bosses']['sven']['level']
ENDER_XP = senither_data['data'][profile_num]['slayers']['bosses']['enderman']['experience']
ENDER_LVL = senither_data['data'][profile_num]['slayers']['bosses']['enderman']['level']
COINS_SPENT = senither_data['data'][profile_num]['slayers']['total_coins_spent']
if EMBED_MODE.lower() == "on":
embed = discord_self_embed.Embed(f"{name}'s Slayer XP and Levels",description="Active profile: {}\nTotal Coins Spent: {:.0f}\n\nRevenant Horror: Level {}\nSlayer XP {:,.0f}\n\nTarantula Broodfather: Level {}\nSlayer XP {:,.0f}\n\nSven Packmaster: Level {}\nSlayer XP {:,.0f}\n\nVoidgloom Seraph: Level {}\nSlayer XP {:,.0f}".format(profile_name, COINS_SPENT, REV_LVL, REV_XP, SPIDER_LVL, SPIDER_XP, SVEN_LVL, SVEN_XP, ENDER_LVL, ENDER_XP),colour="C98FFC",url="https://github.com/itsb1ng/BingBot-Self-Bot")
url = embed.generate_url(hide_url=True)
await ctx.send(f"{url}")
else:
await ctx.send("```\n\t\t{}'s Slayer XP and Levels\nActive profile: {}\nTotal Coins Spent: {:.0f}\n\nRevenant Horror: Level {}\nSlayer XP {:,.0f}\n\nTarantula Broodfather: Level {}\nSlayer XP {:,.0f}\n\nSven Packmaster: Level {}\nSlayer XP {:,.0f}\n\nVoidgloom Seraph: Level {}\nSlayer XP {:,.0f}\n```".format(name, profile_name, COINS_SPENT, REV_LVL, REV_XP, SPIDER_LVL, SPIDER_XP, SVEN_LVL, SVEN_XP, ENDER_LVL, ENDER_XP))
except:
if EMBED_MODE.lower() == "on":
embed = discord_self_embed.Embed(f"Error: Invalid IGN or API Key",colour="C98FFC",url="https://github.com/itsb1ng/BingBot-Self-Bot")
url = embed.generate_url(hide_url=True)
await ctx.send(url)
else:
await ctx.send("```\nError:\nInvalid IGN\n```")
else:
await ctx.send("`Invalid API Key`")
@bing.command()
async def embed(ctx, url="https://github.com/itsb1ng/BingBot-Self-Bot", *, title="BingBot Self-Bot"):
if "https" not in url or "http" not in url:
url = "https://github.com/itsb1ng/BingBot-Self-Bot"
embed = discord_self_embed.Embed(title, colour="C98FFC", url=url)
embed_send = embed.generate_url(hide_url=True)
await ctx.send(embed_send)
@bing.command()
async def pets(ctx, name):
if API_KEY != "":
try:
user_name = requests.get(f"https://api.mojang.com/users/profiles/minecraft/{name}").json()
uuid = user_name["id"]
profile_link = f"https://api.hypixel.net/skyblock/profiles?key={API_KEY}&uuid={uuid}"
sb_data = getInfo(profile_link)
link = f"https://api.hypixel.net/player?key={API_KEY}&uuid={uuid}"
data = getInfo(link)
senither = f"https://hypixel-api.senither.com/v1/profiles/{uuid}?key={API_KEY}"
senither_data = getInfo(senither)
save = 9999999999999999999
for x in range(0, len(sb_data['profiles'])):
for y in sb_data['profiles'][x]['members']:
if uuid == y:
difference = time.time() - sb_data['profiles'][x]['members'][y]['last_save']
if difference < save:
save = sb_data['profiles'][x]['members'][y]['last_save']
profile_id = sb_data['profiles'][x]['profile_id']
for z in range(0,len(senither_data['data'])):
if senither_data['data'][z]['id'] == profile_id:
profile_num = z
profile_name = data['player']['stats']['SkyBlock']['profiles'][profile_id]["cute_name"]
PETS_LIST = []
if len(senither_data['data'][profile_num]['pets']) > 0:
if EMBED_MODE.lower() == "on":
for pet in range(0,10):
PET = "{} {} (LVL {:.0f})".format(senither_data['data'][profile_num]['pets'][pet]['tier'],senither_data['data'][profile_num]['pets'][pet]['type'],senither_data['data'][profile_num]['pets'][pet]['level'])
PETS_LIST.append(PET)
else:
for pet in range(len(senither_data['data'][profile_num]['pets'])):
PET = "{} {} (LVL {:.0f})".format(senither_data['data'][profile_num]['pets'][pet]['tier'],senither_data['data'][profile_num]['pets'][pet]['type'],senither_data['data'][profile_num]['pets'][pet]['level'])
PETS_LIST.append(PET)
ALL_PETS = "\n".join(PETS_LIST)
if EMBED_MODE.lower() == "on":
embed = discord_self_embed.Embed(f"{name}'s Skyblock Pets",description="Active Profile: {}\n\n{}".format(profile_name, ALL_PETS),colour="C98FFC",url="https://github.com/itsb1ng/BingBot-Self-Bot")
url = embed.generate_url(hide_url=True)
await ctx.send(f"{url}")
else:
await ctx.send("```\n\t\t{}'s Skyblock Pets:\nActive Profile: {}\n\n{}```".format(name,profile_name, ALL_PETS))
else:
if EMBED_MODE.lower() == "on":
embed = discord_self_embed.Embed(f"{name} has no pets",description=f"Recent profile ({profile_name}) states user has no pets",colour="C98FFC",url="https://github.com/itsb1ng/BingBot-Self-Bot")
url = embed.generate_url(hide_url=True)
await ctx.send(f"{url}")
else:
await ctx.send(f"```{name} has no pets\nRecent profile ({profile_name}) states user has no pets```")
except:
if EMBED_MODE.lower() == "on":
embed = discord_self_embed.Embed(f"Error: Invalid IGN or API Key",colour="C98FFC",url="https://github.com/itsb1ng/BingBot-Self-Bot")
url = embed.generate_url(hide_url=True)
await ctx.send(url)
else:
await ctx.send("```\nError:\nInvalid IGN\n```")
else:
await ctx.send("`Invalid API Key`")
@bing.command()
async def nitro(ctx, option):
try:
if option.lower() == "on" or option.lower() == "off":
if option.lower() == "on" and config[1]['nitro'].lower() == "off":
config.pop(1)
decision = "on"
decision_dict = {"nitro": "on"}
regular_dict = config[0]
dict_list = [regular_dict, decision_dict]
out_file = open("config.json", "w")
json.dump(dict_list, out_file)
out_file.close()
await ctx.send(f"`Nitro Sniper is now {decision}, BingBot Self-Bot will now restart`")
bing_restart()
elif option.lower() == "off" and config[1]['nitro'].lower() == "on":
config.pop(1)
decision = "off"
decision_dict = {"nitro": "off"}
regular_dict = config[0]
dict_list = [regular_dict, decision_dict]
out_file = open("config.json", "w")
json.dump(dict_list, out_file)
out_file.close()
await ctx.send(f"`Nitro Sniper is now {decision}, BingBot Self-Bot will now restart`")
bing_restart()
else:
await ctx.send(f"`Nitro Sniper is already {option.lower()}`")
else:
await ctx.send("`Invalid Enry!`")
except:
await ctx.send("`Invalid Enry!`")
@bing.command()
async def restart(ctx):
try:
await ctx.send("`BingBot Self-Bot is now restarting`")
bing_restart()
except:
pass
@bing.command()
async def playerdiscord(ctx, ign):
try:
user_name = requests.get(f"https://api.mojang.com/users/profiles/minecraft/{ign}").json()
link = f"https://api.slothpixel.me/api/players/{ign}"
data = getInfo(link)
user_discord = data['links']['DISCORD']
if EMBED_MODE.lower() == "on":
embed = discord_self_embed.Embed(f"{user_name['name']}",description=f"Discord: {user_discord}", colour="C98FFC",url="https://github.com/itsb1ng/BingBot-Self-Bot")
url = embed.generate_url(hide_url=True)
await ctx.send(url)
else:
await ctx.send(f"```\n\t\t{user_name['name']}\nDiscord: {user_discord}\n```")
except:
await ctx.send("`Invalid Enry!`")
@bing.command()
async def spamwebhook(ctx, webber, num="25"):
try:
webber_json = requests.get(webber).json()
webhook = Webhook.from_url(webber, adapter=RequestsWebhookAdapter())
MSG_LINK = "https://gaming-at-my.best/watch.php?video=4V051I.mp4"
embed = discord.Embed(title="ShitRatter.mp4", url=MSG_LINK,color=0xC98FFC)
embed.set_thumbnail(url="https://cdn.discordapp.com/attachments/953054084833878066/953843770456150026/IMG_0672.jpg")
embed.add_field(name="Use better obfuscation next time retard", value="Get beamed bitch")
await ctx.send(f"`{webber_json['name']} is now getting spammed`")
for x in range(0,int(num)):
webhook.send(username="BingBot On Top",avatar_url="https://i.imgur.com/sKwqOXE.png",embed=embed)
time.sleep(2)
except:
await ctx.send("`Could not spam webhook`")
@bing.command()
async def deletewebhook(ctx, webber):
try:
webber_json = requests.get(webber).json()
await ctx.send(f"`{webber_json['name']} has been nuked`")
os.system(f"curl -X DELETE {webber}")
except:
await ctx.send("`Webhook has already been nuked`")
@bing.command()
async def fakenitro(ctx):
nitro_ext = ""
available_char = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
for x in range(0,15):
j = random.randint(0,51)
char = available_char[j]
nitro_ext += char
await ctx.send(f"https://discord.gift/{nitro_ext}")
@bing.command()
async def msghistory(ctx, number, channelid=None):
try:
if channelid == None:
user_messages = await ctx.channel.history(limit=int(number)).flatten()
file = open("messages.txt", "w")
user_messages.reverse()
for item in user_messages:
try:
file.write(f"[{item.created_at.strftime('%m/%d/%Y, %H:%M:%S')}] {item.author.name}#{item.author.discriminator}: {item.content}\n")
except:
pass
file.close()
await ctx.send("Messages Loaded:", file=discord.File("messages.txt"))
os.remove("messages.txt")
else:
channel = bing.get_channel(int(channelid))
user_messages = await channel.history(limit=int(number)).flatten()
file = open("messages.txt", "w")
user_messages.reverse()
for item in user_messages:
try:
file.write(f"[{item.created_at.strftime('%m/%d/%Y, %H:%M:%S')}] {item.author.name}#{item.author.discriminator}: {item.content}\n")
except:
pass
file.close()
await ctx.send("Messages Loaded:", file=discord.File("messages.txt"))
os.remove("messages.txt")
except:
await ctx.send("`Could not get messages`")
@bing.command()
async def add(ctx, num1:float, num2:float):
try:
result = num1 + num2
await ctx.send(f"`{num1:.0f} + {num2:.0f} = {result:.0f}`")
except:
await ctx.send("`Invalid Entries`")
@bing.command()
async def subtract(ctx, num1:float, num2:float):
try:
result = num1 - num2
await ctx.send(f"`{num1:.0f} - {num2:.0f} = {result:.0f}`")
except:
await ctx.send("`Invalid Entries`")
@bing.command()
async def multiply(ctx, num1:float, num2:float):
try:
result = num1 * num2
await ctx.send(f"`{num1:.2f} x {num2:.2f} = {result:.2f}`")
except:
await ctx.send("`Invalid Entries`")
@bing.command()
async def divide(ctx, num1:float, num2:float):
try:
result = num1 / num2
await ctx.send(f"`{num1:.2f} / {num2:.2f} = {result:.2f}`")
except:
await ctx.send("`Invalid Entries`")
@bing.command()
async def nukeserver(ctx):
try:
for c in ctx.guild.channels:
for r in ctx.guild.roles:
try:
await c.delete()
except:
pass
try:
await r.delete()
except:
pass
except:
await ctx.send("`You do not have the correct permissions to execute this command`")
@bing.command()
async def createinvite(ctx, *, guildname):
for guild_ in bing.guilds:
if str(guild_) == str(guildname):
try:
discord_server = bing.get_guild(int(guild_.id))
link = await discord_server.text_channels[0].create_invite()
await ctx.send(link)
except:
pass
startup(config[0]['startup'])
bing.run(DISCORD_TOKEN)
except:
song("failedlogin")
print("\nInvalid Discord Token\n")