So I wanted my bot to detect if the message is an emote, if it is, detects if it's the :smile: emote if it is for example write :smile: anybody can help me? I'm pretty new to discord.js and would really appreciate it if, someone helped me
You can simply implement multiple if-statements inside your message event, for your :smile: example it would look like this:
if(message.content === "😄") return message.channel.send("😄");
You can get the emoji as I displayed in my code, by typing \:smile: in a Discord chat. So for 😂 it would be \:joy:.
Related
I'm new a this :) this is the first code can't I add more?
I'm using discord.js
enter image description here
The question is a bit unclear. But if sending the embed multiple times is what you want you could put the channel.send(exampleEmbed) inside a for loop
developers! I'm making a Roblox Verification bot and I need to see if there is text located inside of a user's blurb.
I've tried a few things, the issue is, I don't want them to just set the blurb to the code, I'll explain.
If I do
if(emojis === blurb){
//do stuff
}
then it'll only work if the blurb is exactly the code.
I want it to trigger if the emojis are inside the blurb at all.
So if the emojis are 😀💯🔹 and their blurb is: "Bob ate an apple 😀💯🔹", the code will trigger.
Any help is appreciated, thank you!
Ah, I've fixed it!
The correct code is:
if(blurb.includes(emojiList)){
// do something
{
This question already has an answer here:
How can I migrate my code to Discord.js v12 from v11?
(1 answer)
Closed 2 years ago.
I am currently doing a kick command and I am getting this error. Can someone help me?
Code:
let kUser = message.guild.member(message.mentions.users.first() || message.guild.members.get(args[0]));
Error:
TypeError: message.guild.members.get is not a function
I hope someone can help me! :-)
I'd suggest using this:
message.guild.members.cache.get
message.guild.members.get(args[0])
What's this supposed to be? What exactly are you trying to do?
if you want a simple kick command that kicks the mentioned user just remove that part from your code and it should work.
If you were trying to kick users by simply writing their name, like "!ban TheDann", that's not how it works. And I would not recommend adding such a feature to your bot either. It can happen that you accidentaly kick another user with a similar name. Just tag the user.
I'm new to react and i've written my query for this message list for "How to change color of the left aligned text?" and i've got the solution but now my query is - If i get a new message then it should display down the new message in the conversation but instead of showing the updated message, It is scrolling upwards and showing older message first.
Can anyone help me in this? Thanks in advance for helping.
I will recommend this library react-scroll-to-bottom. You can see the working demo here.
This is my first post here, so I'm sorry if I'm not in the good section.
My "simple" question is, can we add a gage/gauge (I don't now the exact english spelling), in a Ionic project ?
A thing like that:
https://www.youtube.com/watch?v=w2qrYL0Le24
Or an other exemple:
http://crisbeto.github.io/angular-svg-round-progressbar/
I already tried to insert gauge like that in my project but the gauge never appears, so please, can you help me ?
(The goal is to show to an user a speed for exemple or the batterie life of his smartphone, any importance, juste a jauge who can be incremented or decremented)
Can you explain me please how it works, for example via a Codepen or anything else. I had already tried to search response but I solve anything on that.
I'm french and I am sorry for my language, but thanks in advance for you'r help !
Thanks.
I was able to get this to work:
https://github.com/frapontillo/angular-gage
You must also have the JustGage library and Raphael. Take a look at the example to see it in action. I was able to even make it work in the http://creator.ionic.io app by adding the scripts of angular-gage, JustGage and Raphael (just add a js and paste in the scripts).