What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-24 06:38:06
discord.js get all members with role
//outputs the IDs of all members with the specified role as an array // === discord.js v11 === message.guild.roles.get('ROLE-ID').members.map(m=>m.user.id); // === discord.js v12 === message.guild.roles.cache.get('ROLE-ID').members.map(m=>m.user.id); Add solution -
Javascript 2021-10-22 19:59:15
discord.js package
const Discord = require ('discord.js') const bot = new Discord.Client() bot.on("ready", async () => { console.log("the bot is ready") }) client.on('message', msg => { if (msg.content === '!ping') msg.reply( &quo... Add solution -
Other 2021-10-21 13:47:13
how to mute someone discord.js
const Discord = require('discord.js'); const client = new Discord.Client(); const prefix = "!"; const token = ""; // Fill in your token client.on("message", msg => { msg.content.startsWith(prefix + "mute") { ... Add solution -
Other 2021-10-19 10:14:12
ls-remote --tags --heads ssh://[email protected]/Qix-/node-error-ex.git
"dependencies": { ... "discord.js": "github:vecchiotom/discord.js", ... } Don’t use github: prefix, it is very moody, just use git+https://github.com/user/repo.git. Add solution -
Javascript 2021-10-18 15:03:05
Discord.js ban command
// Import the discord.js module const Discord = require('discord.js'); // Create an instance of a Discord client const client = new Discord.Client(); /** * The ready event is vital, it means that only _after_ this will your bot start reacting to inform... Add solution -
Javascript 2021-10-16 21:59:06
discord.js empty field
const Discord = require('discord.js') const embed = new Discord.MessageEmbed() .setTitle('Example') .addFields( { name: 'foo', value: 'bar', inline: true }, { name: '\u200b', value: '\u200b', inline: true}, { name: 'foo2', value: 'bar... Add solution -
Javascript 2021-10-14 02:52:04
permissions discord.js
/*Check if user in first mention has kick permissions You may need to replace msg with message And user is a variable of the user you want to check */ if (user.hasPermission("KICK_MEMBERS"){ console.log("Has permission") } else { ... Add solution -
Other 2021-10-12 01:36:06
discord embed description
// at the top of your file const Discord = require('discord.js'); // inside a command, event listener, etc. const exampleEmbed = new Discord.MessageEmbed() .setColor('#0099ff') .setTitle('Some title') .setURL('https://discord.js.org/') .setAuthor('So... Add solution -
Javascript 2021-10-11 16:39:04
Discord.js Get A Bot To Join A Music Chanel
//type npm install discord-misic-system --save //type npm install discord.js --save //type node . //see your music bot is ready :] enjoy I LOVE MY INDIA const MusicBot = require("discord-music-system"); // Require the module const bot = new ... Add solution -
Javascript 2021-10-03 18:43:02
simple kick command discord.js v12
//start by defining discord.js const Discord = require('discord.js'); //command handlers exports.run = async (client, message, args) => { if (!message.member.hasPermission('KICK_MEMBERS')) return message.reply('You cannot kick members') let mem... Add solution