Fix check for broadcast
This commit is contained in:
parent
043de8a9e8
commit
bbf454aabc
@ -584,11 +584,11 @@ class Rcon(commands.Cog):
|
|||||||
|
|
||||||
@commands.group(case_insensitive=True)
|
@commands.group(case_insensitive=True)
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
|
@checks.is_moderator()
|
||||||
async def broadcast(self, ctx, server_name, *, message=None):
|
async def broadcast(self, ctx, server_name, *, message=None):
|
||||||
"""Sends a broadcast message to all servers in the guild config.
|
"""Sends a broadcast message to all servers in the guild config.
|
||||||
The message will be prefixed with the Discord name of the person running the command.
|
The message will be prefixed with the Discord name of the person running the command.
|
||||||
Will print "Success" for each server once the broadcast is sent."""
|
Will print "Success" for each server once the broadcast is sent."""
|
||||||
if await checks.is_rcon_admin(self.bot, ctx):
|
|
||||||
if message is not None:
|
if message is not None:
|
||||||
resp = await self.bot.aio_session.get(
|
resp = await self.bot.aio_session.get(
|
||||||
f'{self.bot.api_base}/rcon/{ctx.guild.id}/',
|
f'{self.bot.api_base}/rcon/{ctx.guild.id}/',
|
||||||
@ -623,8 +623,6 @@ class Rcon(commands.Cog):
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
await ctx.send('You must include a message with this command.')
|
await ctx.send('You must include a message with this command.')
|
||||||
else:
|
|
||||||
await ctx.send(f'You are not authorized to run this command.')
|
|
||||||
#
|
#
|
||||||
# @commands.command(aliases=['servers', 'list_servers'])
|
# @commands.command(aliases=['servers', 'list_servers'])
|
||||||
# @commands.guild_only()
|
# @commands.guild_only()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user