mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
Merge more things
This commit is contained in:
parent
a69cb05bd1
commit
0ee9f12d8a
4 changed files with 12 additions and 9 deletions
|
@ -69,8 +69,9 @@ class DiscordBot(GenericBot):
|
|||
async def vc_connect_or_move(cli, channel: discord.VoiceChannel):
|
||||
# Connect to voice chat
|
||||
try:
|
||||
await channel.connect()
|
||||
log.debug(f"Connecting to Voice in {channel}")
|
||||
await channel.connect()
|
||||
log.debug(f"Connected to Voice in {channel}")
|
||||
except discord.errors.ClientException:
|
||||
# Move to the selected channel, instead of connecting
|
||||
# noinspection PyUnusedLocal
|
||||
|
@ -119,12 +120,12 @@ class DiscordBot(GenericBot):
|
|||
try:
|
||||
await command.run(CommandArgs(parameters), data)
|
||||
except InvalidInputError as e:
|
||||
await data.reply(f"⚠️ {e.message}\n"
|
||||
await data.reply(f":warning: {e.message}\n"
|
||||
f"Syntax: [c]/{command.name} {command.syntax}[/c]")
|
||||
except UnsupportedError as e:
|
||||
await data.reply(f"⚠️ {e.message}")
|
||||
await data.reply(f":warning: {e.message}")
|
||||
except CommandError as e:
|
||||
await data.reply(f"⚠️ {e.message}")
|
||||
await data.reply(f":warning: {e.message}")
|
||||
except Exception as e:
|
||||
sentry_sdk.capture_exception(e)
|
||||
error_message = f"🦀 [b]{e.__class__.__name__}[/b] 🦀\n"
|
||||
|
|
|
@ -7,7 +7,6 @@ from .ciaoruozi import CiaoruoziCommand
|
|||
from .color import ColorCommand
|
||||
from .cv import CvCommand
|
||||
from .diario import DiarioCommand
|
||||
from .mp3 import Mp3Command
|
||||
from .ping import PingCommand
|
||||
from .rage import RageCommand
|
||||
from .reminder import ReminderCommand
|
||||
|
@ -18,7 +17,6 @@ from .dnditem import DnditemCommand
|
|||
from .dndspell import DndspellCommand
|
||||
from .trivia import TriviaCommand
|
||||
from .mm import MmCommand
|
||||
from .zawarudo import ZawarudoCommand
|
||||
|
||||
|
||||
commands = [
|
||||
|
@ -26,7 +24,6 @@ commands = [
|
|||
ColorCommand,
|
||||
CvCommand,
|
||||
DiarioCommand,
|
||||
Mp3Command,
|
||||
PingCommand,
|
||||
RageCommand,
|
||||
ReminderCommand,
|
||||
|
@ -37,7 +34,6 @@ commands = [
|
|||
DndspellCommand,
|
||||
TriviaCommand,
|
||||
MmCommand,
|
||||
ZawarudoCommand
|
||||
]
|
||||
|
||||
|
||||
|
|
|
@ -9,6 +9,9 @@ from .playmode import PlaymodeCommand
|
|||
from .queue import QueueCommand
|
||||
from .skip import SkipCommand
|
||||
from .summon import SummonCommand
|
||||
from .youtube import YoutubeCommand
|
||||
from .soundcloud import SoundcloudCommand
|
||||
from .zawarudo import ZawarudoCommand
|
||||
|
||||
|
||||
commands = [
|
||||
|
@ -18,6 +21,9 @@ commands = [
|
|||
QueueCommand,
|
||||
SkipCommand,
|
||||
SummonCommand,
|
||||
YoutubeCommand,
|
||||
SoundcloudCommand,
|
||||
ZawarudoCommand
|
||||
]
|
||||
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ class SoundcloudCommand(Command):
|
|||
async def run(self, args: CommandArgs, data: CommandData) -> None:
|
||||
guild_name, search = args.match(r"(?:\[(.+)])?\s*<?(.+)>?")
|
||||
if search.startswith("http://") or search.startswith("https://"):
|
||||
raise CommandError("YoutubeCommand only accepts search queries, and you've sent an URL.\n"
|
||||
raise CommandError("SoundcloudCommand only accepts search queries, and you've sent an URL.\n"
|
||||
"If you want to add a song from an url, please use PlayCommand!")
|
||||
response = await self.interface.net_request(Request("music_soundcloud", {"search": search,
|
||||
"guild_name": guild_name}),
|
||||
|
|
Loading…
Reference in a new issue