mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
smol bugfix
This commit is contained in:
parent
34d682f0e3
commit
5ebdf49766
4 changed files with 6 additions and 4 deletions
|
@ -44,7 +44,7 @@ class SummonCommand(Command):
|
|||
channel: discord.VoiceChannel = voice.channel
|
||||
# Try to connect to the voice channel
|
||||
try:
|
||||
await channel.connect()
|
||||
client = await channel.connect()
|
||||
except asyncio.TimeoutError:
|
||||
raise ExternalError("Timed out while trying to connect to the channel")
|
||||
except discord.opus.OpusNotLoaded:
|
||||
|
@ -52,3 +52,5 @@ class SummonCommand(Command):
|
|||
except discord.ClientException as e:
|
||||
# TODO: handle this someway
|
||||
raise
|
||||
await asyncio.sleep(6)
|
||||
breakpoint()
|
||||
|
|
|
@ -124,7 +124,7 @@ class DiscordSerf(Serf):
|
|||
# Prepare data
|
||||
data = self.Data(interface=command.interface, session=session, loop=self.loop, message=message)
|
||||
# Call the command
|
||||
self.call(command, data, parameters)
|
||||
await self.call(command, data, parameters)
|
||||
# Close the alchemy session
|
||||
if session is not None:
|
||||
await asyncify(session.close)
|
||||
|
|
|
@ -284,7 +284,7 @@ class Serf:
|
|||
username: the name of the secret that should be retrieved."""
|
||||
return get_password(f"Royalnet/{self.secrets_name}", username)
|
||||
|
||||
def call(self, command: Command, data: CommandData, parameters: List[str]):
|
||||
async def call(self, command: Command, data: CommandData, parameters: List[str]):
|
||||
try:
|
||||
# Run the command
|
||||
await command.run(CommandArgs(parameters), data)
|
||||
|
|
|
@ -197,7 +197,7 @@ class TelegramSerf(Serf):
|
|||
# Prepare data
|
||||
data = self.Data(interface=command.interface, session=session, loop=self.loop, message=message)
|
||||
# Call the command
|
||||
self.call(command, data, parameters)
|
||||
await self.call(command, data, parameters)
|
||||
# Close the alchemy session
|
||||
if session is not None:
|
||||
await asyncify(session.close)
|
||||
|
|
Loading…
Reference in a new issue