broly-logs
v3.2.2
Published
Add many useful events to your discord.js client!
Downloads
145
Maintainers
Readme
Discord Logs
Discord Logs is a powerful package which add many useful events to your Discord.js (v14) client!
const Discord = require('discord.js');
const client = new Discord.Client({
intents: [
Discord.GatewayIntentBits.Guilds,
Discord.GatewayIntentBits.GuildMessages,
Discord.GatewayIntentBits.MessageContent,
Discord.GatewayIntentBits.GuildVoiceStates,
Discord.GatewayIntentBits.GuildPresences,
Discord.GatewayIntentBits.GuildMembers
]
});
const logs = require('broly-logs');
logs(client);
// Access to new events, like guildMemberBoost!
client.on('guildMemberBoost', (member) => {
console.log(`${member.user.tag} just boosted ${member.guild.name}!`);
});
client.on("guildMemberUnboost", (member) => {
console.log(member.user.tag+" has stopped boosting "+member.guild.name+"...");
});
client.on("guildBoostLevelUp", (guild, oldLevel, newLevel) => {
console.log(guild.name+" reaches the boost level: "+newLevel);
});
client.on("guildBoostLevelDown", (guild, oldLevel, newLevel) => {
console.log(guild.name+" returned to the boost level: "+newLevel);
});
// Channel permissions update
client.on("guildChannelPermissionsUpdate", (channel, oldPermissions, newPermissions) => {
console.log(channel.name+"'s permissions updated!");
});
// topic update
client.on("guildChannelTopicUpdate", (channel, oldTopic, newTopic) => {
console.log(channel.name+"'s topic changed to " + newTopic +"!");
});
// role add
client.on("guildMemberRoleAdd", (member, role) => {
console.log(member.user.tag+" acquired the role: "+role.name);
});
// role remove
client.on("guildMemberRoleRemove", (member, role) => {
console.log(member.user.tag+" lost the role: "+role.name);
});
// nickname update
client.on("guildMemberNicknameUpdate", (member, oldNickname, newNickname) => {
console.log(member.user.tag+"'s nickname is now "+newNickname);
});
// member joined
client.on("guildMemberEntered", (member) => {
console.log(member.user.tag+" has passed the gate!");
});
client.login('YOUR_DISCORD_BOT_TOKEN');