-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get bots to use discord commands? #46
Comments
Using commands? Idk about. Mentioning people? Here var target = bot.getUser("username", stringWithUsername);
var response = target.mention + ", your message.";
bot.sendMessage(message.channel, response); |
I'm getting this error now |
..... replace "stringWithUsername" so that it is a variable that has the username in in... |
You can also make a message TTS by specifying the option parameter, check On Thu, 5 Nov 2015 7:13 am Khionu Terabite notifications@github.com wrote:
|
Good to know, re TTS |
so msg.sender.username? |
If you want to mention them, no. If you just want their username, yep. To mention do: msg.sender.mention() OR do msg.sender + "" On Thu, 5 Nov 2015 7:21 am PastaAdventures notifications@github.com wrote:
|
Or, if you want to mention the sender at the beginning |
so this is suppose to send a tts msg? |
|
ok, i think i'm good |
That's not what. "msg.sender.username" is just going to give you the string. That's not what I showed you to Mention them. |
yeah, for this one i just want the string, but want the bot to tts the whole msg. Specifying the parameter for tts does not seem to make the bot tts the msg |
Options is an object, not just true. You need to use: { On Thu, 5 Nov 2015 7:57 am PastaAdventures notifications@github.com wrote:
|
hi @khionu what do you mean by replacing "stringWithUsername" as a variable, I am new to discord.js so could you kindly show men how you can do this in javascript, Thanks in advance! |
@FredyTek are you trying to send a message that mentions someone? |
Please don't revive old issues... Make a new one if you have a question |
Yes @Azoy |
can someone help me? what im trying to do is so if someone types "@botName hi" the bot will say whatever back but how do you get teh prefix to be the bots @? |
@ChlckenWings I got that to work by simply watching the message.content to include client.user which is my bot. So, for example: Hope that helps. |
i want my bot to be able to use /tts and @
The text was updated successfully, but these errors were encountered: