0
votes

So I'm coding a Discord bot for a friend and I need to see if a message was sent in a specific channel. I tried a few things, asked a few people, and searched for an answer, but I couldn't find any. This is about the closest I've gotten and I've tried changing a few objects:

if message.channelID == ('#858884357271322634'):
  await message.channel.send ('I checked and verified the channel.')
1

1 Answers

1
votes

Your check does not really makes sense, there is no such message.channelID.

Simply compare message.channel.id with the ID you want to and insert it correctly.

Simple example:

if message.channel.id == 858884357271322634:
    await message.channel.send("I checked and verified the channel.")