Added a function to allow users to change the noisegate threshold

This commit is contained in:
Logan Cusano
2022-03-27 01:15:17 -04:00
parent 24adc47109
commit 22d6d5d3d7
2 changed files with 14 additions and 4 deletions

10
bot.py
View File

@@ -156,6 +156,16 @@ class Bot(commands.Bot):
else:
await ctx.send(f"{str(member).capitalize()}, I'm not in a channel")
# Add command to change the NoiseGate threshold
@self.command(help="Use this command to change the threshold of the noisegate",
brief="Change noisegate sensitivity")
async def chngth(ctx, _threshold: int, member: discord.Member = None):
member = member or ctx.author.display_name
print(f"Change of NoiseGate threshold requested by {member}")
await ctx.send(f"Ok {str(member).capitalize()}, I'm changing the threshold from "
f"{self.streamHandler.THRESHOLD} to {_threshold}")
self.streamHandler.THRESHOLD = _threshold
# Add commands for GQRX and OP25
if self.Handler in BotResources.PDB_ACCEPTABLE_HANDLERS.keys():
# Command to display the current config