我已经在互联网上进行搜索,但是我似乎只找到过时/过时的教程/指南,以了解如何播放声音。
这是我的代码:
import discord
import time
import asyncio
import schedule
from discord.ext import commands
client = commands.Bot(command_prefix="-ff ")
Client = discord.Client()
@client.command()
async def hello(message):
await message.channel.send('Hello!')
@client.command()
async def join(ctx):
channel = ctx.author.voice.channel
await channel.connect()
@client.command()
async def leave(ctx):
await ctx.voice_client.disconnect()
@client.event
async def on_ready():
print(f'{client.user} has connected to Discord!')
client.run('NoneOfYourBuissnes')