Skip to content

Is there a way to make Jukebox reply to another bot's message? #827

Answered by Hazmi35
KTSnowy asked this question in Q&A
Discussion options

You must be logged in to vote

You can, but I generally avoid the idea of listening to bot (including own) messages, because it can cause security issues, for example, moderation commands usually check if the user has specific permissions, but when the bot has it and if non-moderators can use the bot to say something, that is a security issue.

But if you insist, you can change this statement in

if (message.author.bot || message.channel.type !== "GUILD_TEXT") return message;

to

// If the message is bot's own message, return
if (message.author.id !== message.client.user.id || message.channel.type !== "GUILD_TEXT") return message; 

Or even better…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@KTSnowy
Comment options

@Hazmi35
Comment options

@KTSnowy
Comment options

@Hazmi35
Comment options

@Hazmi35
Comment options

Answer selected by KTSnowy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants