我是Discord.py的新手。我想知道是否有可能使用Python对不一致的群聊进行重命名。我知道这是自我机器人,它破坏了他们的ToS。但是如果可能的话,有人能带我去正确的方向吗?到目前为止,我得到的是:await discord.GroupChannel.edit(channel, name = "test"),但是我得到了一个无效的语法。
完整代码:
import discord
from discord import Member
import json
import pyfiglet
import asyncio
import time
from discord.ext
discord.py文档有一个spotify类(),我想知道如何将此活动设置为概要文件。文档中没有示例。我尝试在on_ready事件中使用此活动。
@client.event
async def on_ready():
print("Bot was connected to the server")
await bot.change_presence(activity=discord.Spotify(title = "Test"))
我的输出是错的。
Bot was connected to the server
Ignoring excepti
我需要使标记作者在这一行This is your random {} pick,
token = "xxxxxxxxxxxxxxxxxxxxxxxx"
prefix = "?"
import discord
from discord.ext import commands
from discord.ext.commands import Bot
import random
bot = commands.Bot(command_prefix=prefix)
bot.remove_command("help")
@bot.event
asyn
我正在做我自己的不和谐机器人,通过许多错误和错误,我得出了一个同样的大错误,我不知道它是什么。
File "C:\Users\Daniel\PycharmProjects\discord-bot\venv\lib\site-packages\discord\http.py", line 300, in static_login
data = await self.request(Route('GET', "/users/@me"))
File "C:\Users\Daniel\PycharmProjects\discord-bot
我从commands.Bot切换到discord.Bot以获得斜杠命令和前缀命令。它给出了错误
File "/home/-/Desktop/Stuff/CODING/Discord-Bot-OrbiBot/cogs/economy.py", line 270, in setup
bot.add_cog(Economy(bot))
File "/home/-/.local/lib/python3.9/site-packages/discord/cog.py", line 546, in add_cog
cog = cog._inject(sel
我是python和discord.py的初学者,我需要帮助 我想让我的机器人在我输入'@firstPythonProject? Bot#4320 say (message you want the bot to say)的时候说点什么,但是代码错误地说 C:\Users\Arshdeep Singh\Desktop\firstPythonProject_ Bot>python bot.py
Logged on as firstPythonProject? Bot#4320
firstPythonProject? Bot#4320 has connected to Discord
当我在Discord.py中使用特定的命令来创建我的机器人时,我仍然收到这个错误:
raise MissingRequiredArgument('{0.name} is a required argument that is missing.'.format(param))
discord.ext.commands.errors.MissingRequiredArgument: self is a required argument that is missing.
我当前的代码是:
@bot.command()
async def about(self):
当我试图为XP创建一个discord.js机器人时,我得到了一个名为"ER_PARSE_ERROR“的错误。有人能帮帮我吗?下面是我的代码:
var con = mysql.createConnection({
host: "127.0.0.1",
user: "root",
password: "",
database: "sadb"
});
function generatedXp() {
let min = 20;
let max = 30;
return Math.floor
我遇到了这样一个错误:
Traceback (most recent call last):
File "E:\AS-TEAM\cp\public\hello.py", line 22, in <module>
bot.run("thisistokensorry:(", Bot=False)
File "E:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\client.py", line 723, in run
我想让我的机器人用hi回复|hello import discord
from discord.ext import commands
from discord import Game
bot = commands.Bot(command_prefix = "|")
bot.remove_command('help')
#just some console feedback thing, this works fine, dont think it matters here
@bot.event
async def on_ready():
awa