What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-01-30 22:40:18
how to give a role to a new member in discord.js
let role = message.guild.roles.find(r => r.name === "Role Name"); // Let's pretend you mentioned the user you want to add a role to (!addrole @user Role Name): let member = message.mentions.members.first(); // or the person who made started... Add solution -
Javascript 2022-01-26 20:05:56
add role to channel discord.js
let role = message.guild.roles.find(r => r.name === "Role Name"); // Let's pretend you mentioned the user you want to add a role to (!addrole @user Role Name): let member = message.mentions.members.first(); // or the person who made started... Add solution -
Javascript 2022-01-22 03:31:43
reaction role by id discord.js
const Discord = require('discord.js'); const client = new Discord.Client({ partials: ['MESSAGE', 'CHANNEL', 'REACTION'] }); //partials arent really needed but I woudld reccomend using them because not every reaction is stored in the cache (it's new in v12... Add solution -
Javascript 2021-11-06 18:35:18
make welcome message and channel discord.js
// This is the needed event to use the welcome! bot.on('guildMemberAdd', async newMember => { // IMPORTANT NOTE: Make Sure To Use async and rename bot to client or whatever name you have for your bot events! const welcomeChannel = newMember.gui... Add solution -
Javascript 2021-10-25 07:02:08
discord.js add role to user
let role = message.guild.roles.cache.find(r => r.id === "Role ID"); // The member you want to add the role to let member = message.mentions.members.first(); // Add role to the member member.roles.add(role); // Or add it to yourself message... Add solution -
Javascript 2021-10-17 05:58:04
how to code welcome messages
// This is the needed event to use the welcome! bot.on('guildMemberAdd', async newMember => { // IMPORTANT NOTE: Make Sure To Use async and rename bot to client or whatever name you have for your bot events! const welcomeChannel = newMember.gui... Add solution -
Other 2021-10-12 06:30:06
welcome discord.js
// This is the needed event to use the welcome! bot.on('guildMemberAdd', async newMember => { // IMPORTANT NOTE: Make Sure To Use async and rename bot to client or whatever name you have for your bot events! const welcomeChannel = newMember.gui... Add solution -
Javascript 2021-09-14 05:24:01
discord.js mute command
const Discord = require('discord.js') exports.run = async (client, message, args) => { if (!message.member.hasPermission('MUTE_MEMBERS')) return message.reply('You cannot use this command'); if (!message.guild.me.hasPermission('MANAGE_ROLES')) ret... Add solution -
Javascript 2021-09-09 22:20:03
discord.js mute script
const Discord = require('discord.js') exports.run = async (client, message, args) => { if (!message.member.hasPermission('MUTE_MEMBERS')) return message.reply('You cannot use this command'); if (!message.guild.me.hasPermission('MANAGE_ROLES')) ret... Add solution