Closed KAMILUKA closed 5 years ago
Not sure if publicly posting your token is a good idea
I cant start my bot
const Discord = require('discord.js')
Sounds about right.
idk what is wrong in my code...
GitHub issues are not the place to report your own incompetence. Please close this issue, and then join the discord.js help server: https://discord.gg/bRCvFy9
![image](https://user-images.githubusercontent.com/53615766/62375104-cf79a880-
b53d-11e9-86c8-8afaf2c314c3.png) const token = '' const Discord = require('discord.js') const client = new Discord.Client()
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //kick komanda
let kick = message.guild.member(message.mentions.users.first() || message.guild.members.get(args[0])); if(!kick) return message.channel.send("can't find user!"); let razlog = args.join(" ").slice(22); if(!message.member.hasPermission(MANAGE_MESSAGES)) return message.channel.send("No can do pal!"); let kickembed = new Discord.RichEmbed() if(kick.hasPermission("MANAGE_MESSAGES")) return message.channel.send("That person can't be kicked!") .setDescription ("~Kick~") .setColor("#fc0303") .addField("Kicked User",
${kick} with ID ${kick.id}
) .addField("Kicked By",<@${message.author.id}> with ID ${message.author.id}
) .addField("Kicked In", message.channel) .addfield("Time", message.createdAt) .addfield("Reason", kickreason); let kickChannel = message.guild.channels.find(name
, "hags") if(!kickChannel) return message.channel.send("can't find hag channel.")message.guild.member(kick).kick(kickreason); kickChannel.send(kickembed);
return; //////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////// //ban komanda
if(cmd ===
${prefix}ban
){} //////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////// //add role/remove role
module.exports.run = async (bot, message, args) => { if(!message.member.hasPermission("MANAGE_MEMBERS")) return message.reply("Sorry pal, you can't do that."); let rMember = message.guild.member(message.mentions.users.first()) || message.guild.members.get(args[0]); if(!rrole) return message.reply("Couldn't find that user, yo."); let role = args.join(" ").slice(22); if(!role) return message.reply("Specify a role!"); let grole = message.guild.roles.find(
name
, role); if(!grole) return message.reply("Couldn't find that role.");if(!rrole.roles.has(gRole.id)) return message.reply("They don't have that role."); await(rrole.removeRole(gRole.id));
try{ await rrole.send(
RIP, you lost the ${grole.name} role.
) }catch(e){ message.channel.send(RIP to <@${rrole.id}>, We removed ${grole.name} from them. We tried to DM them, but their DMs are locked.
) } }module.exports.help = { name: "removerole" }
client.on('ready', () => { console.log('Your bot is now connected'); });
client.login(token);