Open betaMFD opened 2 years ago
What do you mean exactly? Like take parts of the message and use them in the response?
While I'd be happy if it were set in the response, I want the DiscordJS Message object because it has a lot of DiscordJs functionality. So I don't want parts of it, I want the whole object. I can't see where I can get it right now without having the robot save it for me in the adapter's onmessage
function, or forgoing robot.hear()
/robot.respond()
all together and using robot.client.on()
which feels like I'm wasting the hubot infrastructure.
Does that make sense?
In the adapter's onmessage
, I've tried just passing the DiscordJs Message object to @robot.receive
instead of creating and passing the Hubot TextMessage object, but I end up with an error because the DiscordJs User object doesn't have the "room" in it.
Is the DiscordJS Message easily accessible somehow from a robot.hear() or robot.respond() script?
I "cheated" on my fork and just saved it raw to the robot
robot.discordJsMessage = message
inonmessage
so I can access it easily but that doesn't feel very clean or correct. But I'm using it constantly because all the good features are in the DiscordJS Message.