discord

How to make the bot send personalized emojis?

…衆ロ難τιáo~ 提交于 2021-02-10 17:28:41
问题 Well, I'm currently using the emoji :x: , but on my server I have an emoji called :superbotxemoji : I just don't know how I get my bot to use it My code: const Discord = require('discord.js'); module.exports = { name: 'say', description: 'say', execute(message, args) { const { prefix, token } = require('../config.json'); if (!message.member.hasPermission('ADMINISTRATOR')) return message.channel.send({ embed: { color: 16777201, description: `:x: | ${message.author}, You are not allowed to use

How to make the bot send personalized emojis?

牧云@^-^@ 提交于 2021-02-10 17:27:35
问题 Well, I'm currently using the emoji :x: , but on my server I have an emoji called :superbotxemoji : I just don't know how I get my bot to use it My code: const Discord = require('discord.js'); module.exports = { name: 'say', description: 'say', execute(message, args) { const { prefix, token } = require('../config.json'); if (!message.member.hasPermission('ADMINISTRATOR')) return message.channel.send({ embed: { color: 16777201, description: `:x: | ${message.author}, You are not allowed to use

How to make the bot send personalized emojis?

倾然丶 夕夏残阳落幕 提交于 2021-02-10 17:26:14
问题 Well, I'm currently using the emoji :x: , but on my server I have an emoji called :superbotxemoji : I just don't know how I get my bot to use it My code: const Discord = require('discord.js'); module.exports = { name: 'say', description: 'say', execute(message, args) { const { prefix, token } = require('../config.json'); if (!message.member.hasPermission('ADMINISTRATOR')) return message.channel.send({ embed: { color: 16777201, description: `:x: | ${message.author}, You are not allowed to use

How to make the bot send personalized emojis?

こ雲淡風輕ζ 提交于 2021-02-10 17:26:08
问题 Well, I'm currently using the emoji :x: , but on my server I have an emoji called :superbotxemoji : I just don't know how I get my bot to use it My code: const Discord = require('discord.js'); module.exports = { name: 'say', description: 'say', execute(message, args) { const { prefix, token } = require('../config.json'); if (!message.member.hasPermission('ADMINISTRATOR')) return message.channel.send({ embed: { color: 16777201, description: `:x: | ${message.author}, You are not allowed to use

How to make the bot send personalized emojis?

不问归期 提交于 2021-02-10 17:26:04
问题 Well, I'm currently using the emoji :x: , but on my server I have an emoji called :superbotxemoji : I just don't know how I get my bot to use it My code: const Discord = require('discord.js'); module.exports = { name: 'say', description: 'say', execute(message, args) { const { prefix, token } = require('../config.json'); if (!message.member.hasPermission('ADMINISTRATOR')) return message.channel.send({ embed: { color: 16777201, description: `:x: | ${message.author}, You are not allowed to use

How to make the bot send personalized emojis?

a 夏天 提交于 2021-02-10 17:25:16
问题 Well, I'm currently using the emoji :x: , but on my server I have an emoji called :superbotxemoji : I just don't know how I get my bot to use it My code: const Discord = require('discord.js'); module.exports = { name: 'say', description: 'say', execute(message, args) { const { prefix, token } = require('../config.json'); if (!message.member.hasPermission('ADMINISTRATOR')) return message.channel.send({ embed: { color: 16777201, description: `:x: | ${message.author}, You are not allowed to use

Music functionality without the correct package discord.js

爱⌒轻易说出口 提交于 2021-02-10 14:16:32
问题 I started making a Discord Bot without thinking I would like to add music/voice functionality. I would now like to add this, but as the docs state you need to install: Without voice support: npm install discord.js With voice support (@discordjs/opus): npm install discord.js @discordjs/opus With voice support (opusscript): npm install discord.js opusscript I installed the one without voice support when I began, can I just install the voice support ones over or will that mess it up. If so, what

Fetch a message (by ID) and edit it

浪子不回头ぞ 提交于 2021-02-10 14:16:28
问题 I'm trying to edit a message the bot sent, in a different function. const msg = message.channel.fetchMessage(msgId); msg.edit(embed); Didn't work because msg.edit is not a function. message.channel.messages.fetch({around: "352292052538753025", limit: 1}) .then(messages => { messages.first().edit("test"); }); Didn't work because .fetch is not a function. function update(msgId, time, channelid, prize, winnersInt, message) { setTimeout(function(){ let gtime = time/3600000 + " hours remaining!";

Fetch a message (by ID) and edit it

二次信任 提交于 2021-02-10 14:15:19
问题 I'm trying to edit a message the bot sent, in a different function. const msg = message.channel.fetchMessage(msgId); msg.edit(embed); Didn't work because msg.edit is not a function. message.channel.messages.fetch({around: "352292052538753025", limit: 1}) .then(messages => { messages.first().edit("test"); }); Didn't work because .fetch is not a function. function update(msgId, time, channelid, prize, winnersInt, message) { setTimeout(function(){ let gtime = time/3600000 + " hours remaining!";

How to securely store the Access-Token of a Discord(OAuth2) User?

百般思念 提交于 2021-02-10 10:53:46
问题 I'm struggling to find a way to securely save an Access-Token, which my web application retrieved from the DiscordAPI after the user authorized the application. I'm creating a web-interface for a Discord Bot. Here it is important, that not everyone can use it. Only server-moderators and such on a specific Discord server should be allowed to access most parts of the website. For this I'm using the OAuth2 stuff from Discord to retrieve an Access-Token with which I can get user info, such as