欢迎消息Python Discord Bot

时间:2020-08-23 10:08:08

标签: python discord bots message

我想用Python3做一个Discord Bot。 我想在#welcome频道中添加一条消息,并通过PM向新用户添加一条消息。 我没有收到任何错误,但该漫游器未发送任何消息。

这是我的代码:

#welcome message
@client.event
async def on_member_join(member):
    channel = discord.utils.get(member.guild.channels, name='willkommen')
    await channel.send(f"Hallo auf dem Server")
    await message.author.send(f"Hallo auf dem Server")

以下是进口:

import discord
import random
import asyncio
import logging
from discord.ext import commands    

有人知道如何解决此问题? 谢谢!! :)

0 个答案:

没有答案