Check if receive no content response

This commit is contained in:
Dustin Pianalto 2019-12-16 19:47:57 -09:00
parent 090ba646c9
commit 5a7c68bdcb

View File

@ -284,7 +284,7 @@ class Rcon(commands.Cog):
f'{self.bot.api_base}/rcon/{ctx.guild.id}/{server_name}/listplayers', f'{self.bot.api_base}/rcon/{ctx.guild.id}/{server_name}/listplayers',
headers=self.bot.auth_header headers=self.bot.auth_header
) )
if resp.status == 200: if resp.status == 200 or resp.status == 204:
message = '\n'.join(await resp.json()) message = '\n'.join(await resp.json())
await ctx.channel.trigger_typing() await ctx.channel.trigger_typing()
await msg.delete() await msg.delete()