This commit is contained in:
11
app/bot.py
11
app/bot.py
@@ -88,10 +88,10 @@ class DiscordBotManager:
|
||||
|
||||
voice_client = await channel.connect()
|
||||
streamHandler = NoiseGate(
|
||||
_input_device_index=device_id,
|
||||
_voice_connection=voice_client,
|
||||
_noise_gate_threshold=ng_threshold)
|
||||
# Start the audio stream
|
||||
_input_device_index=device_id,
|
||||
_voice_connection=voice_client,
|
||||
_noise_gate_threshold=ng_threshold)
|
||||
# Start the audio stream
|
||||
streamHandler.run()
|
||||
self.voice_clients[guild_id] = voice_client
|
||||
print(f"Joined guild {guild_id} voice channel {channel_id}.")
|
||||
@@ -108,6 +108,7 @@ class DiscordBotManager:
|
||||
del self.voice_clients[guild_id]
|
||||
print(f"Left guild {guild_id} voice channel.")
|
||||
|
||||
|
||||
# Initialize Discord Bot Manager
|
||||
bot_manager = DiscordBotManager()
|
||||
|
||||
@@ -154,4 +155,4 @@ async def get_status():
|
||||
|
||||
|
||||
app.include_router(op25_controller.router, prefix="/op25")
|
||||
app.include_router(pulse.router, prefix="/pulse")
|
||||
app.include_router(pulse.router, prefix="/pulse")
|
||||
|
||||
Reference in New Issue
Block a user