Added a function to allow users to change the noisegate threshold
This commit is contained in:
10
bot.py
10
bot.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user