#pulling from the config file with a name i pulled from message?

15 messages · Page 1 of 1 (latest)

stiff anvil
#

I'm trying to grab the Emoji name and then pull the name from the config file how the best way to do this

"flags":{
        "US": {
            "language": "English",
            "languagecode": "en"            
        },
slender foxBOT
#
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
severe spoke
#

what emoji name?

stiff anvil
#

US

glad riverBOT
#
  • For unicode emojis (twemoji): learn more
  • Custom emojis: /<?(a)?:?(\w{2,32}):(\d{17,19})>?/ learn more
stiff anvil
#

need it so it pulls from the config like if i was puting in the code as config.flags."emote name"

severe spoke
#

then do config.flags[emojiName] with emojiName being the variable you stored the parsed name in

stiff anvil
#
const emojiName = messageReaction.emoji.name
        console.log("Emote Name:" + emojiName);    
        console.log(config.flags[emojiName]);   

and i get out

#

im using 🇺🇸

tepid spire
#

you can map the regional indicator characters to the normal characters, or just use the regional indicators/flag emoji in your json

stiff anvil
#

well i got it to work only problem is on windows i see it as.
But on Linux i see the Flags no idea how to fix that.

severe spoke
#

there's nothing to be fixed... your code works the same, doesn't it?

stiff anvil
#

yea just make it harder to program because i dont know how to type the flags in on windows like i can on Linux i just copy and paste but will not let me or it just dus normal text and not the fancy text that is needed to read the emoji correctly

glad riverBOT
#
  • Custom emojis: \:name:<a:name:id>
  • Twemojis: \:name: ➞ unicode representation
  • Emoji picker: WIN + . / CMD + CTRL + SPACE / CTRL + .
  • Right-clicking any emoji will not copy its id!