小编Nis*_*eth的帖子

在discord.py中访问成员的横幅

我正在制作图像配置文件命令。我想为此访问会员的横幅。我们有什么办法可以在discord.py 中做到这一点吗?

横幅

如果不清楚我所说的横幅是什么意思,那么蓝色背景的图像就是横幅。我想访问它。

python image-processing discord discord.py

3
推荐指数
1
解决办法
6744
查看次数

我在 discord.py 的 on_message 事件中收到 TypeError

我收到以下错误:

Traceback (most recent call last):
  File "main.py", line 41, in <module>
    @bot.event()
TypeError: event() missing 1 required positional argument: 'coro'
Run Code Online (Sandbox Code Playgroud)

我的代码:

主文件

#------importing packages

import keep_alive
import os
import discord
from discord.ext import commands


bot = commands.Bot(command_prefix = '-', case_insensitive=True)


my_token = os.environ['Token']

#------When bot is online


@bot.event
async def on_ready():

    #status
    #playing game status

    await bot.change_presence(activity=discord.Game(
        name=f'On {len(bot.guilds)} Servers | -help'))

    print('Bot is Ready')

@bot.event()
async def on_message(message):
    # if message.content.startswith(bot.user.mentioned_in(message)):
    #     await message.channel.send('My prefix is `-`')

    if …
Run Code Online (Sandbox Code Playgroud)

python discord discord.py

0
推荐指数
1
解决办法
41
查看次数

标签 统计

discord ×2

discord.py ×2

python ×2

image-processing ×1