F
F
feneeq2021-06-15 00:53:32
Node.js
feneeq, 2021-06-15 00:53:32

How to send a message from a discord bot with a changed nickname?

Hello, Khabrachane)
I'm new to discord.js and I need help.
I need to somehow implement this little thing:
!hug @Nick
!bot: The user hugged @Nick
However, I need to make sure that @Nick is replaced by some specific
one. !hug @fyuuri and in response the bot (My nickname) hugged the 'closet'
Tried to do it through a constant and if msg.content, but in vain
const member = (msg.content === '@Nick')
if ('!member') return message.channel.send('... Replaced nickname');
I searched all over discord.js, but it's empty there too

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2021-06-15
@feneeq

https://discordjs.guide/creating-your-bot/commands...
https://learn.javascript.ru/ifelse

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question