admin管理员组文章数量:1315835
I'm currently working on a discord bot mand that replies with an embed message the code looks like this. (yes im following a tutorial)
const Discord = require('discord.js');
module.exports.run = async (bot, message, args) => {
const embed = new Discord.MessageEmbed()
.setTitle('**Library Wisp | SR - L Nightmare**')
.setURL('')
.setThumbnail('.png')
.setColor('#E2B007')
.addFields(
{ name: ':skillstory: **Blessed Armor (II)**', value: '\n SP:0 \n Prep. Time: 20s \n Duration 0s \n Effect: Greatly Increases Physial and Magical Defense for all surviving allies.'},
{ name: ':skillcolloseum: **Blessed Armor (II)**', value: '\n SP:0 \n Prep. Time: 60s \n Duration 0s \n Effect: Greatly Increases Physial and Magical Defense for all surviving front-allies.'},
{ name: '**Stats**', value: '**LEVEL** | lv 1 | lv 60 | lv 65 | lv 70 | lv 75 | lv 80 | \n **PATK** | 319 | 968 | 1023 | 1078 | 1133 | 1188 | \n **PDEF** | 323 | 972 | 1027 | 1082 | 1137 | 1192 |'},
)
message.channel.send(embed);
}
module.exports.config = {
name: "lwisp",
description: "",
usage: "lwisp",
accessableby: "Members",
aliases: []
}
in within the fields I would like to have an emote displayed, I thought by using the emote and the job would be done but I am wrong, it is a custom emote and what I am trying to achieve is something like this
I'm currently working on a discord bot mand that replies with an embed message the code looks like this. (yes im following a tutorial)
const Discord = require('discord.js');
module.exports.run = async (bot, message, args) => {
const embed = new Discord.MessageEmbed()
.setTitle('**Library Wisp | SR - L Nightmare**')
.setURL('https://sinoalice.game-db.tw/nightmares/ライブラリウィスプ')
.setThumbnail('https://i.imgur./sANYH9P.png')
.setColor('#E2B007')
.addFields(
{ name: ':skillstory: **Blessed Armor (II)**', value: '\n SP:0 \n Prep. Time: 20s \n Duration 0s \n Effect: Greatly Increases Physial and Magical Defense for all surviving allies.'},
{ name: ':skillcolloseum: **Blessed Armor (II)**', value: '\n SP:0 \n Prep. Time: 60s \n Duration 0s \n Effect: Greatly Increases Physial and Magical Defense for all surviving front-allies.'},
{ name: '**Stats**', value: '**LEVEL** | lv 1 | lv 60 | lv 65 | lv 70 | lv 75 | lv 80 | \n **PATK** | 319 | 968 | 1023 | 1078 | 1133 | 1188 | \n **PDEF** | 323 | 972 | 1027 | 1082 | 1137 | 1192 |'},
)
message.channel.send(embed);
}
module.exports.config = {
name: "lwisp",
description: "",
usage: "lwisp",
accessableby: "Members",
aliases: []
}
in within the fields I would like to have an emote displayed, I thought by using the emote and the job would be done but I am wrong, it is a custom emote and what I am trying to achieve is something like this
Share Improve this question edited Jul 11, 2020 at 8:57 Mohsen Alyafei 5,5773 gold badges35 silver badges54 bronze badges asked Jul 11, 2020 at 2:44 mahmoud alfawalmahmoud alfawal 251 gold badge1 silver badge4 bronze badges1 Answer
Reset to default 6First of all, wele to StackOverflow !
In order to get your emotes on an embed you'll have to follow this few steps :
Go to your server where the emote is, type it in the chat box, like you would normally do to send it, and but a backslash (
\
) on front of it. After sending this, you should see something like this :<:EmoteName:420150420046660911>
Then, make sure that your bot is in the same server as where the emote is.
Now, if you copy-paste the full emote text you got earlier in one of your embed's fields, you should now be able to see your emotes inside of it !
(Optional) If your emote is animated, you'll have to add an
a
on front of your:EmoteName:
, wiich would make the result look like this :<a:EmoteName:420150420046660911>
I hope that I was prehensible enough, and that my explainations will help you to fix your issue ! :3
本文标签: javascriptDiscord bot embedding custom emote jsStack Overflow
版权声明:本文标题:javascript - Discord bot embedding custom emote js - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741987819a2408788.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论