update commands which check the statuses of servers
@@ -148,7 +148,7 @@ class Minecraft(commands.Cog):
embed.set_image(url=f'https://betterapi.net/mc/servercard/{combined}&v={random.random()*100000}')
if jj['favicon'] is not None:
- embed.set_thumbnail(url=f'https://betterapi.net/mc/serverfavi/{combined}')
+ embed.set_thumbnail(url=f'https://betterapi.net/mc/serverfavicon/{combined}')
await ctx.send(embed=embed)
@@ -161,7 +161,7 @@ class Minecraft(commands.Cog):
combined = s[0]
async with ctx.typing():
- async with self.ses.get(f'https://betterapi.net/mc/mcping?host={combined}&k={self.d.k}') as res: # fetch status from api
+ async with self.ses.get(f'https://betterapi.net/mc/mcstatus/{combined}', headers={'Authorization': self.d.vb_api_key}) as res: # fetch status from api
jj = await res.json()
if not jj['success'] or not jj['online']:
@@ -201,10 +201,10 @@ class Minecraft(commands.Cog):
inline=False
)
- embed.set_image(url=f'https://betterapi.net/mc/mcpingimg?host={combined}&imgonly=true&v={random.random()*100000}&k={self.d.k}')
+ embed.set_image(url=f'https://betterapi.net/mc/servercard/{combined}&v={random.random()*100000}')
if jj['favicon'] is not None:
- embed.set_thumbnail(url=f'https://betterapi.net/mc/serverfavi?host={combined}&k={self.d.k}')
+ embed.set_thumbnail(url=f'https://betterapi.net/mc/serverfavicon/{combined}')
await ctx.send(embed=embed)
