Comments (20)
- Learn JS
- Read the Discord.JS documentation
- Read what we said above.
from discord.js.
Using commands? Idk about.
Mentioning people? Here
var target = bot.getUser("username", stringWithUsername);
var response = target.mention + ", your message.";
bot.sendMessage(message.channel, response);
from discord.js.
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 [email protected] wrote:
so msg.sender.username?
—
Reply to this email directly or view it on GitHub
#46 (comment)
.
from discord.js.
I'm getting this error now
http://i.imgur.com/aKIHSvE.png
from discord.js.
..... replace "stringWithUsername" so that it is a variable that has the username in in...
from discord.js.
You can also make a message TTS by specifying the option parameter, check
the docs for Client.sendMessage for an example of this.
On Thu, 5 Nov 2015 7:13 am Khionu Terabite [email protected] wrote:
..... replace "stringWithUsername" so that it is a variable that has the
username in in...—
Reply to this email directly or view it on GitHub
#46 (comment)
.
from discord.js.
Good to know, re TTS
from discord.js.
so msg.sender.username?
from discord.js.
Or, if you want to mention the sender at the beginning bot.reply(message, "what you want to tell them");
from discord.js.
so this is suppose to send a tts msg?
if (msg.content === "!notice") {
bot.sendMessage(msg.channel, "Hey " + msg.sender.username + "!", true)
}
from discord.js.
ok, i think i'm good
from discord.js.
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.
from discord.js.
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
from discord.js.
Options is an object, not just true. You need to use:
{
tts:true
}
On Thu, 5 Nov 2015 7:57 am PastaAdventures [email protected] wrote:
yeah, for this on i just want the string, but wan the bot to tts the whole
msg—
Reply to this email directly or view it on GitHub
#46 (comment)
.
from discord.js.
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!
from discord.js.
@FredyTek are you trying to send a message that mentions someone?
from discord.js.
Please don't revive old issues... Make a new one if you have a question
from discord.js.
Yes @Azoy
I will @abalabahaha
from discord.js.
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 @?
from discord.js.
@ChlckenWings I got that to work by simply watching the message.content to include client.user which is my bot.
So, for example:
if(message.content.includes(client.user)){ message.channel.send('Yes?'); }
Hope that helps.
from discord.js.
Related Issues (20)
- Async cache functions (filter/keepOverLimit)
- setName method for updating channel name does not consistently resolve promises HOT 1
- Client.destroy fails with error HOT 1
- Major: discordjs/rest crashing on Node v16.9.1 HOT 14
- components: this.components.map((component) => component.toJSON()) HOT 1
- Nickname is always null, bot has right permissions and intents HOT 5
- feat(create-discord-bot): automatically update versions in templates
- Implement guild.voiceAdapterCreator from discord.js into APIGuild from @discordjs/core HOT 2
- Interaction channel loses guildId
- Error when trying to use discord.js HOT 1
- Object GuildEmoji for guildAuditLogEntryCreate event HOT 5
- Max messages in cache is not working HOT 1
- Support Custom status on activity objects HOT 1
- Custom REST rate limit offsets for specific routes
- UnsupportedCacheOverwriteWarning when using TSX HOT 4
- Dapi-types links to option type
- Syntax Error in index.d.ts HOT 3
- ts build error HOT 1
- Unable to delete webhook when instantiated with WebhookClient
- Update to Node Requirement 16.11.0 Breaks previous releases of Discord.js HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discord.js.