#๐Ÿ”’ Discord bot

48 messages ยท Page 1 of 1 (latest)

pallid gladeBOT
#

@coarse rivet

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

coarse rivet
#

Okay, let me explain the type of bot i want you to make:
1.
I want this bot to be checking the MAZINKOOOO channel (id:1099175930188009583) for the message1 "Boosted: Bamboo" or the message2 "Boosted: Blue Flower".

2a. When the bot sees message1 I want the bot to send a command (?set FieldName1 Bamboo) to the POTMASTEROVER90000 channel (id:1260803844812570767). Then I want the bot to send 2 more commands to the same channel 5 seconds later (?stop) and another 5 seconds later send (?start).

2b. When the bot sees message2 I want the bot to send a command (?set FieldName1 Blue Flower) to the POTMASTEROVER90000 channel (id:1260803844812570767). Then I want the bot to send 2 more commands to the same channel 5 seconds later (?stop) and another 5 seconds later send (?start).

(message 1 and 2 are from anotherr bot)

  1. 15 minutes after the last command I want the bot to send the commands (?set FieldName1 Pine Tree), then 5 seconds later the command (?stop), then another 5 seconds later the command (?start).
  2. I want this bot to be scanning for "message1" and "message2" 24/7.
lucid orbit
coarse rivet
#

this

#

is my code

lucid orbit
#

and what is the problem?

coarse rivet
#

It detects when my user id sends message 1 and 2

#

but not the bot

#

see it doesnt detect this

#

the code fully works apart from detecting the message from the other bot

#

this is the full code

#

the other one was my testing

#

i have no errors, and when debugging i found that it detected the the bot sending messages properly, it detected the right channel but it only doesnt detect the message

#

ive been trying to fix this for the past week and this my last resort lol

fair mason
#

Change your discord bot token, if haven't already. Since you sent it in pastebin

coarse rivet
#

ikik

#

but any idea whats wrong?

fair mason
#

Are you getting any prints from on_message event?

coarse rivet
#

yeah

fair mason
#

Is it form the bot?

coarse rivet
#

Message is from the specific bot and in the correct channel.

and

No matching keyword found in the message:

coarse rivet
fair mason
#

!d discord.Message.embeds

pallid gladeBOT
fair mason
#

You probably want the content of the embeds since the messages have no content

coarse rivet
#

can you explain?

#

i dont understand

fair mason
#

You are getting content of message with content = message.content

#

But you want content of embed from that message

fair mason
# pallid glade

That can be obtained by getting embeds attribute of message

coarse rivet
#

so what yould be the new code?

#

would

fair mason
#

Try implementing it

#

I will help you if you are lost

coarse rivet
#

okay

#

where do i start with this?

#

sorry first time with python

fair mason
#

You should try printing contents of embeds inside the if

#

embeds attribute of message will return you list of all embeds

#

The part of the embed you probably want is description

coarse rivet
fair mason
#

That one where you are checking if the message is from that bot and inside that channel

coarse rivet
#

FIXED IT

#

tysm

pallid gladeBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.