如何使Discord Bot播放mp3文件

时间:2020-10-04 21:08:16

标签: python discord.py

我已经在互联网上进行搜索,但是我似乎只找到过时/过时的教程/指南,以了解如何播放声音。

这是我的代码:

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')

0 个答案:

没有答案