前提・実現したいこと
チャンネル作成をしたら通知する機能で作成したチャンネルをメンションしたいです。
発生している問題・エラーメッセージ
なし
該当のソースコード
disocrd.py
1@bot.event 2async def on_guild_channel_create(channel): 3 for channel in channel.guild.channels: 4 if str(channel) == "テスト": 5 embed = discord.Embed(title="チャンネルの作成",description=f"{channel.mention}が__作成__されました。" ,color=0x42f085) 6 await channel.send(embed=embed)
これで実行すると、str(channel)
で指定したチャンネルがメンションされてしまいます。
試したこと
channel = create.channel
とかを入れたり....
補足情報(FW/ツールのバージョンなど)
言語:Discord.py
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。