· 6 years ago · Mar 15, 2020, 03:18 PM
1import discord
2from discord.ext import commands
3import fortnite_api
4import asyncio
5
6
7
8client = commands.Bot(command_prefix = '?')
9
10token = 'NjczOTMzMTIyNTU5Mjc5MTE0.XjhPXg.WPMAjKP71EPVsS0uqU1EEzXUVes'
11apikey = 'd40f221e637b336a2877f2b9c306371bd59b451bcb0bc6e3cdb29df2851cfd56'
12api = fortnite_api.FortniteAPI(apikey)
13
14#------------------------
15
16client.remove_command('help')
17
18print("Bot is Loading | 0%")
19
20@client.event
21async def on_ready():
22 await client.change_presence(status=discord.Status.online, activity=discord.Game('?help | donate.fortbrleaks.com'))
23 print('Bot is Loading | 100%')
24
25
26@client.command()
27async def help(ctx):
28 help_embed = discord.Embed(
29 colour = discord.Colour.blue()
30 )
31
32 help_embed.set_footer(text= 'Support the bot: donate.fortbrleaks.com')
33 help_embed.set_author(name='All Commands',
34 icon_url='https://i.imgur.com/G4oLfZn.png')
35 help_embed.add_field(name='?ping', value='Shows the bots ping to the server', inline=True)
36 help_embed.add_field(name='?donate', value='Find information on how to donate to keep the bot online!', inline=True)
37 help_embed.add_field(name='?aes', value='The latest Fortnite AES key & build number', inline=True)
38 help_embed.add_field(name='?id', value='Search for the skin ID. (Usage = ?id <skin-name>)', inline=True)
39 help_embed.add_field(name='?cc', value='Find what Epic Account is linked to a creator code. (Usage = ?cc <epic-ign>)', inline=True)
40 help_embed.add_field(name='?path', value='Find the path that the skin is found in the game files. (Usage = ?path <skin-name>)', inline=True)
41 await ctx.send(embed=help_embed)
42
43
44#----------------------------------
45
46
47@client.command()
48async def ping(ctx):
49 ping_embed = discord.Embed(
50 title = f'My ping is currently {round(client.latency * 1000)}ms',
51 colour = discord.Colour.blue()
52 )
53
54 ping_embed.set_author(name='Ping | ? ➡️ ?',
55
56 icon_url='https://i.imgur.com/G4oLfZn.png')
57 await ctx.send(embed=ping_embed)
58
59#DONATE
60@client.command()
61async def donate(ctx):
62 donate_embed = discord.Embed(
63 colour = discord.Colour.blue()
64 )
65
66 donate_embed.set_author(name='Donations',
67 icon_url='https://i.imgur.com/G4oLfZn.png')
68 donate_embed.add_field(name='Donate Here:', value='http://donate.fortbrleaks.com', inline=False)
69 await ctx.send(embed=donate_embed)
70
71#------------------------
72
73#AES
74aes_data = api.aes.fetch()
75@client.command()
76async def aes(ctx):
77 aes_embed = discord.Embed(
78 colour = discord.Colour.blue()
79 )
80
81 aes_embed.set_footer(text= 'Support the bot: donate.fortbrleaks.com')
82 aes_embed.set_author(name='Fortnite AES Key & Build Number',
83 icon_url='https://i.imgur.com/G4oLfZn.png')
84 aes_embed.add_field(name='AES Key', value='0x'+aes_data.aes, inline=False)
85 aes_embed.add_field(name='Build Number', value=aes_data.build, inline=False)
86 await ctx.send(embed=aes_embed)
87
88
89
90#ID SEARCH
91@client.command()
92async def id(ctx, *, arg):
93 id_embed = discord.Embed(
94 colour = discord.Colour.blue()
95 )
96 id_embed.set_footer(text= 'Support the bot: donate.fortbrleaks.com')
97 id_embed.set_author(name='Fortnite Cosmetic ID for '+api.cosmetics.search_first(name=arg).name,
98 icon_url='https://i.imgur.com/G4oLfZn.png')
99 id_embed.add_field(name='Cosmetic ID:', value=api.cosmetics.search_first(name=arg).id)
100 await ctx.send(embed=id_embed)
101
102#CC SEARCH
103@client.command()
104async def cc(ctx, arg):
105 cc_embed = discord.Embed(
106 colour = discord.Colour.blue()
107 )
108 cc_embed.set_footer(text= 'Support the bot: donate.fortbrleaks.com')
109 cc_embed.set_author(name='Who does that creator code belong to: ',
110 icon_url='https://i.imgur.com/G4oLfZn.png')
111 cc_embed.add_field(name='Epic Games Display Name:', value=api.creator_code.search_first(arg).user.name)
112 await ctx.send(embed=cc_embed)
113
114#PATH SEARCH
115@client.command()
116async def path(ctx, *, arg):
117 path_embed = discord.Embed(
118 colour = discord.Colour.blue()
119 )
120 path_embed.set_footer(text= 'Support the bot: donate.fortbrleaks.com')
121 path_embed.set_author(name='Fortnite path for '+api.cosmetics.search_first(name=arg).name,
122 icon_url='https://i.imgur.com/G4oLfZn.png')
123 path_embed.add_field(name='Path:', value=api.cosmetics.search_first(name=arg).display_asset_path)
124 await ctx.send(embed=path_embed)
125
126
127
128
129client.run(token)