def join(self, ctx, *, channel : discord.Channel):
"""Joins a voice channel."""
if str(ctx.message.author.voice_channel) is not null or str(ctx.message.author.voice_channel.id) != self.bot.music_channel:
await self.embed_for_me('I can only play in Music voicechannel. This is '+str(ctx.message.author.voice_channel),ctx)
return False
try:
await self.create_voice_client(channel)
except discord.ClientException:
await self.embed_for_me('Already in a voice channel...',ctx)
except discord.InvalidArgument:
await self.embed_for_me('This is not a voice channel...',ctx)
else:
await self.embed_for_me('Ready to play audio in '+channel.name,ctx)
评论列表
文章目录