Improved help messages
This commit is contained in:
20
bot.py
20
bot.py
@@ -138,9 +138,12 @@ class Bot(commands.Bot):
|
||||
|
||||
# Add commands for GQRX and OP25
|
||||
if self.Handler == 'gqrx' or self.Handler == 'op25':
|
||||
@self.command(name='chfreq', help="Use this command to change the frequency the bot is listening to. "
|
||||
"\nExample command: '@ chfreq wfm 104700000\n"
|
||||
"Example command: '@ chfreq p25 154.785",
|
||||
@self.command(name='chfreq', help="Use this command to change the frequency the bot is listening to.\n"
|
||||
"Example GQRX command:\n"
|
||||
"\tTune to 104.7Mhz Wideband FM (Radio) - '@ chfreq wfm 104700000\n"
|
||||
"\tTune to 155.505Mhz Narrowband FM (Radio) - '@ chfreq fm 155505000\n"
|
||||
"Example OP25 command:\n"
|
||||
"\tTune to 155.310Mhz, decode using P25 - '@ chfreq p25 155.310",
|
||||
brief="Changes radio frequency")
|
||||
async def chfreq(ctx, mode: str, freq: str, member: discord.Member = None):
|
||||
# Possible band-types that can be used
|
||||
@@ -161,8 +164,8 @@ class Bot(commands.Bot):
|
||||
if mode in possible_modes:
|
||||
self.mode = mode
|
||||
|
||||
await ctx.send(f"Ok {str(member).capitalize()}, I'm changing the mode to {str(self.mode).upper()} and frequency to"
|
||||
f" {self.freq}")
|
||||
await ctx.send(f"Ok {str(member).capitalize()}, I'm changing the mode to "
|
||||
f"{str(self.mode).upper()} and frequency to {self.freq}")
|
||||
|
||||
# Reset the profile name since we have made a change to the freq
|
||||
self.profile_name = None
|
||||
@@ -180,8 +183,11 @@ class Bot(commands.Bot):
|
||||
|
||||
# GQRX Specific commands
|
||||
if self.Handler == 'gqrx':
|
||||
@self.command(name='chsquelch', help="Use this command to change the squelch for the frequency"
|
||||
"the bot is listening to",
|
||||
@self.command(name='chsquelch', help="Use this command to change the squelch for the frequency "
|
||||
"the bot is listening to\n"
|
||||
"Example Commands:\n"
|
||||
"\tNo Squelch\t'@ chsquelch 150'\n"
|
||||
"\tFully Squelched\t'@ chsquelch 0'",
|
||||
brief="Changes radio squelch")
|
||||
async def chsquelch(ctx, squelch: float, member: discord.Member = None):
|
||||
member = member or ctx.author.display_name
|
||||
|
||||
Reference in New Issue
Block a user