Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhruvacube committed Sep 30, 2021
1 parent a17b918 commit 02c13a7
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions minato_namikaze/bot_files/lib/util/post_user_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ async def delete_commands(self):
try:
allcmd = requests.get(
f'https://fateslist.xyz/api/v2/bots/{self.bot.user.id}/commands',
headers={"Authorization": fateslist,"Content-Type": "application/json"}
headers={"Authorization": BotList.fateslist.name,"Content-Type": "application/json"}
)
if allcmd.status_code != 404:
for i in allcmd1:
for j in allcmd1.get(i):
requests.delete(
f'https://fateslist.xyz/api/v2/bots/{self.bot.user.id}/commands/{j.get("id")}',
headers={"Authorization": fateslist,"Content-Type": "application/json"}
headers={"Authorization": BotList.fateslist.name,"Content-Type": "application/json"}
)
await asyncio.sleep(5)
return True
Expand Down Expand Up @@ -56,7 +56,7 @@ async def post_commands(self):
for i in commands_list:
j = await self.post(
f'https://fateslist.xyz/api/v2/bots/779559821162315787/commands',
headers={"Authorization": fateslist,
headers={"Authorization": BotList.fateslist.name,
"Content-Type": "application/json"},
json=i,
getrequestobj=True
Expand All @@ -72,7 +72,7 @@ async def post_commands(self):
await asyncio.sleep(res[0])
k = await self.post(
f'https://fateslist.xyz/api/v2/bots/779559821162315787/commands',
headers={"Authorization": fateslist,
headers={"Authorization": BotList.fateslist.name,
"Content-Type": "application/json"},
json=i,
)
Expand All @@ -81,7 +81,7 @@ async def post_commands(self):
try:
allcmd = requests.get(
f'https://fateslist.xyz/api/v2/bots/{self.bot.user.id}/commands',
headers={"Authorization": fateslist,"Content-Type": "application/json"}
headers={"Authorization": BotList.fateslist.name,"Content-Type": "application/json"}
)
if allcmd.status_code != 404:
allcmd1 = allcmd.json()
Expand All @@ -91,7 +91,7 @@ async def post_commands(self):
if j.get('cmd_name') in all_cogs:
requests.delete(
f'https://fateslist.xyz/api/v2/bots/{self.bot.user.id}/commands/{j.get("id")}',
headers={"Authorization": fateslist,"Content-Type": "application/json"}
headers={"Authorization": BotList.fateslist.name,"Content-Type": "application/json"}
)
await asyncio.sleep(5)
except:
Expand Down Expand Up @@ -121,51 +121,51 @@ async def post_guild_stats_all(self):
shards=1

a = await self.post(f'https://top.gg/api/bots/{self.bot.user.id}/stats',
headers={'Authorization': topken},
headers={'Authorization': BotList.topken.name},
data={'server_count': guildsno,"shard_count":shards}
)
b = await self.post(f'https://discordbotlist.com/api/v1/bots/{self.bot.user.id}/stats',
headers={'Authorization': dblst},
headers={'Authorization': BotList.dblst.name},
data={'guilds': guildsno, 'users': members}
)
c = await self.post(f'https://discords.com/bots/api/bot/{self.bot.user.id}',
headers={'Authorization': bfd,
headers={'Authorization': BotList.bfd.name,
'Content-Type': 'application/json'},
json={'server_count': guildsno}
)
d = await self.post(f'https://api.discordlist.space/v2/bots/{self.bot.user.id}',
headers={'Authorization': f'Bot {botlist}',
headers={'Authorization': f'Bot {BotList.botlist.name}',
'Content-Type': 'application/json'},
json={'serverCount': guildsno, 'active': True}
)
e = await self.post(f'https://discord.boats/api/bot/{self.bot.user.id}',
headers={'Authorization': discordboats},
headers={'Authorization': BotList.discordboats.name},
data={'server_count': guildsno}
)
f = await self.post(f'https://discord.bots.gg/api/v1/bots/{self.bot.user.id}/stats',
headers={'Authorization': discordbotsgg,
headers={'Authorization': BotList.discordbotsgg.name,
'Content-Type': 'application/json'},
json={'guildCount': guildsno,"shardCount":shards}
)

i = await self.post(f'https://api.voidbots.net/bot/stats/{self.bot.user.id}',
headers={"Authorization": voidbot,
headers={"Authorization": BotList.voidbot.name,
"Content-Type": "application/json"},
json={"server_count": guildsno,"shard_count":shards})
j = await self.post(f'https://fateslist.xyz/api/v2/bots/{self.bot.user.id}/stats',
headers={"Authorization": fateslist,
headers={"Authorization": BotList.fateslist.name,
"Content-Type": "application/json"},
json={"guild_count": guildsno, "user_count": members,"shard_count":shards})
k = await self.post(f'https://bladebotlist.xyz/api/bots/{self.bot.user.id}/stats',
headers={"Authorization": bladebot,
headers={"Authorization": BotList.bladebot.name,
"Content-Type": "application/json"},
json={"servercount": guildsno,"shardcount":shards})
l = await self.post(f'https://bots.discordlabs.org/v2/bot/{self.bot.user.id}/stats',
headers={"Authorization": discordlabs,
headers={"Authorization": BotList.discordlabs.name,
"Content-Type": "application/json"},
json={"server_count": guildsno,"shard_count":shards})
m = await self.post(f'https://api.infinitybotlist.com/bot/{self.bot.user.id}',
headers={"Authorization": infinity},
headers={"Authorization": BotList.infinity.name},
json={"servers": guildsno, "botid":self.bot.user.id,'shards':shards}
)

Expand Down

0 comments on commit 02c13a7

Please sign in to comment.