androz2091 / discord-logs Goto Github PK
View Code? Open in Web Editor NEWπFramework that simplify the usage of advanced Discord logs
πFramework that simplify the usage of advanced Discord logs
The event only emits when the message edited has been sent after bot started
bot.on('guildAfkChannelAdd', (guild, afkChannel) => {
// Code
});
When you specify the event it becomes any.
Below is the list with the parameters:
/** https://discord-logs.js.org/ */
/** Channel Events -> Events related to the channelUpdate event. */
guildChannelTopicUpdate: [ channel: GuildChannel, oldTopic: String, newTopic: String ];
guildChannelPermissionsUpdate: [ channel: GuildChannel, oldPermissions: PermissionOverwrites, newPermissions: PermissionOverwrites ];
unhandledGuildChannelUpdate: [ oldChannel: GuildChannel, newChannel: GuildChannel ];
/** Guild Member Events -> Events related to the guildMemberUpdate event. */
guildMemberBoost: [ member: GuildMember ];
guildMemberUnboost: [ member: GuildMember ];
guildMemberRoleAdd: [ member: GuildMember, role: Role ];
guildMemberRoleRemove: [ member: GuildMember, role: Role ];
guildMemberNicknameUpdate: [ member: GuildMember, oldNickname: String, newNickname: String ];
guildMemberEntered: [ member: GuildMember ];
unhandledGuildMemberUpdate: [ oldMember: GuildMember, newMember: GuildMember ];
/** Guild Events -> Events related to the guildUpdate event. */
guildBoostLevelUp: [ guild: Guild, oldLevel: Number, newLevel: Number ];
guildBoostLevelDown: [ guild: Guild, oldLevel: Number, newLevel: Number ];
guildBannerAdd: [ guild: Guild, bannerURL: String ];
guildAfkChannelAdd: [ guild: Guild, afkChannel: String ];
guildVanityURLAdd: [ guild: Guild, vanityURL: String ];
guildVanityURLRemove: [ guild: Guild, vanityURL: String ];
guildVanityURLUpdate: [ guild: Guild, oldVanityURL: String, newVanityURL: String ];
guildFeaturesUpdate: [ oldGuild: Guild, newGuild: Guild ];
guildAcronymUpdate: [ oldGuild: Guild, newGuild: Guild ];
guildOwnerUpdate: [ oldGuild: Guild, newGuild: Guild ];
guildPartnerAdd: [ guild: Guild ];
guildPartnerRemove: [ guild: Guild ];
guildVerificationAdd: [ guild: Guild ];
guildVerificationRemove: [ guild: Guild ];
unhandledGuildUpdate: [ oldGuild: Guild, newGuild: Guild ];
/** Message Events -> Events related to the messageUpdate event. */
messagePinned: [ message: Message ];
messageContentEdited: [ message: Message, oldContent: String, newContent: String ];
unhandledMessageUpdate: [ oldMessage: Message, newMessage: Message ];
/** Presence Events -> Events related to the presenceUpdate event. */
guildMemberOffline: [ member: GuildMember, oldStatus: Status ];
guildMemberOnline: [ member: GuildMember, newStatus: Status ];
unhandledPresenceUpdate: [ oldPresence: Presence, newPresence: Presence ];
/** Role Events -> Events related to the roleUpdate event. */
rolePositionUpdate: [ role: Role, oldPosition: Number, newPosition: Number ];
rolePermissionsUpdate: [ role: Role, oldPermissions: Number, newPermissions: Number ];
unhandledRoleUpdate: [ oldRole: Role, newRole: Role, ];
/** Thread Channel Events -> Events related to the threadUpdate event. */
threadStateUpdate: [ oldThread: ThreadChannel, newThread: ThreadChannel ];
threadNameUpdate: [ thread: ThreadChannel, oldName: String, newName: String ];
threadLockStateUpdate: [ oldThread: ThreadChannel, newThread: ThreadChannel ];
threadRateLimitPerUserUpdate: [ thread: ThreadChannel, oldRateLimitPerUser: Number, newRateLimitPerUser: Number ];
threadAutoArchiveDurationUpdate: [ thread: ThreadChannel, oldAutoArchiveDuration: Number, newAutoArchiveDuration: Number ];
unhandledThreadUpdate: [ oldThread: ThreadChannel, newThread: ThreadChannel ];
/** User Events -> Events related to the userUpdate event. */
userAvatarUpdate: [ user: User, oldAvatarURL: String, newAvatarURL: String ];
userUsernameUpdate: [ user: User, oldUsername: String, newUsername: String ];
userDiscriminatorUpdate: [ user: User, oldDiscriminator: String, newDiscriminator: String ];
userFlagsUpdate: [ user: User, oldFlags: String, newFlags: String ];
unhandledUserUpdate: [ oldUser: User, newUser: User ];
/** Voice Events -> Events related to the voiceStateUpdate event. */
voiceChannelJoin: [ member: GuildMember, channel: GuildChannel ];
voiceChannelLeave: [ member: GuildMember, channel: GuildChannel ];
voiceChannelSwitch: [ member: GuildMember, oldChannel: GuildChannel, newChannel: GuildChannel ];
voiceChannelMute: [ member: GuildMember, type: "self-muted" | "server-muted" ];
voiceChannelUnmute: [ member: GuildMember, type: "self-muted" | "server-muted" ];
voiceChannelDeaf: [ member: GuildMember, type: "self-deafed" | "server-deafed" ];
voiceChannelUndeaf: [ member: GuildMember, type: "self-deafed" | "server-deafed" ];
voiceStreamingStart: [ member: GuildMember, type: GuildChannel ];
voiceStreamingStop: [ member: GuildMember, type: GuildChannel ];
messagePinned
Only emits for messages sent after the client is logged in. It should also emit for messages sent before the client logs in.
Example:
Message A is sent before the client logged in. The bot logs in and a user pins Message A. The bot does nothing with that pinned message.
The bot logs in. Message A is sent. Message A is pinned & emitted.
https://i.imgur.com/gPpKoN9.png
I just changed my status dnd to offline, and bot spammed many times in the console that user became offline!
Please fix it
`"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator"throw"); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while () try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
/**
Does it possible extend default emoji events to have a user object
No errors, logs, etc.
client.on('ChannelNameUpdate', async(oldName, NewName) => {
console.log('The channel name has been updated from ' + oldName + ' to ' + newName)
}
gets triggered when a channel name is changed!
No errors, logs, etc.
I have this event handler code with the custom guildChannelPermissionsUpdate
event.
const Discord = require("discord.js");
module.exports = {
name: "guildChannelPermissionsUpdate",
async execute(channel, oldPermissions, newPermissions, client) {
let log = process.env.LOG_CHANNEL
client.channels.cache.get(log).send(
new Discord.MessageEmbed()
.setColor("RANDOM")
.setThumbnail(client.user.displayAvatarURL())
.setAuthor(
"Channel Permissions Updated",
client.user.displayAvatarURL()
)
.setDescription("A channel's permissions have been updated.")
.addField(`Channel Name`, channel.name)
.addField("Channel ID", `\`${channel.id}\``)
.setTimestamp()
);
}
}
when someone start a streaming he trigger the event 3 times
this is my code
const logs = require('discord-logs');
const { Message } = require('discord.js');
module.exports = class {
constructor(client) {
this.client = client;
logs(client);
}
async run(member, voiceChannel) {
let channel = this.client.channels.cache.get('724348520923922574');
channel.send(`hey, ${member.user.tag} is now live in ${voiceChannel} streaming ${member.user.presence.activities[0]}`)
}
};
/app/tests/test.js:9 console.log("Ready. Logged as "+client.user.tag+" in "+client.guilds.cache.size+" servers."); ^ TypeError: Cannot read property 'size' of undefined at Client.client.on (/app/tests/test.js:9:80) at Client.emit (events.js:194:15) at WebSocketConnection.triggerReady (/rbd/pnpm-volume/1ca3098b-affb-4b93-b7e8-fcd8a4a14bd0/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:125:17) at WebSocketConnection.checkIfReady (/rbd/pnpm-volume/1ca3098b-affb-4b93-b7e8-fcd8a4a14bd0/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:141:61) at GuildCreateHandler.handle (/rbd/pnpm-volume/1ca3098b-affb-4b93-b7e8-fcd8a4a14bd0/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/websocket/packets/handlers/GuildCreate.js:13:31) at WebSocketPacketManager.handle (/rbd/pnpm-volume/1ca3098b-affb-4b93-b7e8-fcd8a4a14bd0/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:105:65) at WebSocketConnection.onPacket (/rbd/pnpm-volume/1ca3098b-affb-4b93-b7e8-fcd8a4a14bd0/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35) at WebSocketConnection.onMessage (/rbd/pnpm-volume/1ca3098b-affb-4b93-b7e8-fcd8a4a14bd0/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17) at WebSocket.onMessage (/rbd/pnpm-volume/1ca3098b-affb-4b93-b7e8-fcd8a4a14bd0/node_modules/.registry.npmjs.org/ws/6.2.1/node_modules/ws/lib/event-target.js:120:16) at WebSocket.emit (events.js:189:13)
sir how to fix the.
const logs = require("discord-logs");
logs(client, {
debug: true,
});
client.on("guildMemberNicknameUpdate", (member, oldNickname, newNickname) => {
console.log(member.user.tag + "'s nickname is now " + newNickname);
});
The event doesn't fire on member.user.tag changing his name.
No error is shown
const client = require('../index');
const { MessageEmbed } = require('discord.js');
const { server_log } = require('.//../channel.json');
// Joined VC
client.on('voiceChannelJoin', (member, channel) => {
const LogChannel = client.channels.cache.get(server_log);
const VCJoined = new MessageEmbed()
.setTitle('Voice Channel Joined')
.setColor('#2F3136')
.setDescription(member.user.tag + ' joined ' + `${channel}` + '!');
return LogChannel.send({
embeds: [VCJoined],
});
});
require('./events/voiceChannelJoin');
node:internal/modules/cjs/loader:936
throw err;
^
Require stack:
- F:\Discord bot packages\3rd\index.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:94:18)
at Object.<anonymous> (F:\Discord bot packages\3rd\index.js:32:1)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ 'F:\\Discord bot packages\\3rd\\index.js' ]
}
In discord.js 14.3.0 (V14) Module gives that error
TypeError: discord_js_1.Intents is not a constructor
at C:\Users\user\Desktop\v14-Altpayi-main\node_modules\discord-logs\lib\index.js:47:19
at step (C:\Users\user\Desktop\v14-Altpayi-main\node_modules\discord-logs\lib\index.js:33:23)
at Object.next (C:\Users\user\Desktop\v14-Altpayi-main\node_modules\discord-logs\lib\index.js:14:53)
at C:\Users\user\Desktop\v14-Altpayi-main\node_modules\discord-logs\lib\index.js:8:71
at new Promise ()
at __awaiter (C:\Users\user\Desktop\v14-Altpayi-main\node_modules\discord-logs\lib\index.js:4:12)
at module.exports (C:\Users\user\Desktop\v14-Altpayi-main\node_modules\discord-logs\lib\index.js:41:54)
at Object. (C:\Users\user\Desktop\v14-Altpayi-main\main.js:5:1)
at Module._compile (node:internal/modules/cjs/loader:1126:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
discord-logs version: ^2.0.1
Node.js version: 16.17.0
const embed = new MessageEmbed()
.setColor(role.guild.me.displayHexColor)
.setTimestamp()
.setTitle(`Role Added`)
if(!channel) return;
channel.send({embeds: [
embed.addField(`Added by:`, `**${member.user.tag}** (${member})`, true)
.addField(`Role:`, `${role}`, true)
.addField(`Added to: `, `${role.}`, true)
]}).catch((err) => {
return console.log(err)
});```
on the field (Added to) when i o ```role.member.user.tag``` is shows me undefined
in npm https://www.npmjs.com/package/discord-logs still the discord-logs version is 2.0.1 which was released a year ago
When will the latest 2.2.0 version will be released n npm ??
Hello there!
I created a custom client (that actually extends Discord.Client
). I want it to use discord-logs.
import { Client, ClientOptions } from 'discord.js';
import addDiscordLogsFramework from 'discord-logs';
class DatadropClient extends Client {
constructor(options: ClientOptions) {
super(options);
addDiscordLogsFramework(this);
}
}
Unfortunately, it seems that the library throws a TypeError whenever I try to pass it the this
parameter.
I receive the following report from my logger:
H:\git\personal\datadrop\node_modules\discord-logs\lib\index.js:47
intents = new discord_js_1.Intents(client.options.intents);
^
TypeError: discord_js_1.Intents is not a constructor
at H:\git\personal\datadrop\node_modules\discord-logs\lib\index.js:47:19
at step (H:\git\personal\datadrop\node_modules\discord-logs\lib\index.js:33:23)
at Object.next (H:\git\personal\datadrop\node_modules\discord-logs\lib\index.js:14:53)
at H:\git\personal\datadrop\node_modules\discord-logs\lib\index.js:8:71
at new Promise (<anonymous>)
at __awaiter (H:\git\personal\datadrop\node_modules\discord-logs\lib\index.js:4:12)
at module.exports (H:\git\personal\datadrop\node_modules\discord-logs\lib\index.js:41:54)
at new DatadropClient (H:\git\personal\datadrop\build\src\datadrop.js:67:36)
at Object.<anonymous> (H:\git\personal\datadrop\build\index.js:30:16)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
I checked your issues and saw that #171 and #169 talk about it. Both are closed by #172. Unfortunately, no release version has been made. Would it be possible to publish [email protected] if possible?
Can't install it using npm i discord-logs
, it's always giving error , even when I download the package through repo ,still can't install it . Please fix it ... error is like this :
npm ERR! syscall spawn git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://[email protected]/discordjs/discord.js.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\anksark\AppData\Roaming\npm-cache\_logs\2020-04-16T11_13_21_994Z-debug.log```
and in the log file :
```verbose stack Error: spawn git ENOENT
20 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
20 verbose stack at onErrorNT (internal/child_process.js:469:16)
20 verbose stack at processTicksAndRejections (internal/process/task_queues.js:84:21)
21 verbose cwd C:\Users\anksark\Documents\WeirdTrexy
22 verbose Windows_NT 10.0.18363
23 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "./discord-logs"
24 verbose node v12.16.1
25 verbose npm v6.13.4
26 error code ENOENT
27 error syscall spawn git
28 error path git
29 error errno ENOENT
30 error enoent Error while executing:
30 error enoent undefined ls-remote -h -t ssh://[email protected]/discordjs/discord.js.git
30 error enoent
30 error enoent
30 error enoent spawn git ENOENT
31 error enoent This is related to npm not being able to find a file.
32 verbose exit [ 1, true ]```
Does this package need any intents
GUILD_MEMBERS or GUILD_PRESENCES
Can we fetch the action executer from these two events
if yes then how? pls tell
In every events it coming undefined instedof objects
code: (event handler)
const fs = require("fs");
const allevents = [];
module.exports = async (client) => {
const logs = require("discord-logs");
logs(client, {
debug: true
})
try {
try {
const stringlength = 69;
console.log("\n")
console.log(` ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ`.bold.brightGreen)
console.log(` β `.bold.brightGreen + " ".repeat(-1 + stringlength - ` β `.length) + "β".bold.brightGreen)
console.log(` The Events handler is starting [events.js] `.bold.blue)
console.log(` β `.bold.brightGreen + " ".repeat(-1 + stringlength - ` β `.length) + "β".bold.brightGreen)
console.log(` ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ`.bold.brightGreen)
} catch {
/* */ }
let amount = 0;
const load_dir = (dir) => {
const event_files = fs.readdirSync(`./events/${dir}`).filter((file) => file.endsWith(".js"));
for (const file of event_files) {
try {
const event = require(`../events/${dir}/${file}`)
let eventName = file.split(".")[0];
allevents.push(eventName);
client.on(eventName, event.bind(null, client));
amount++;
} catch (e) {
console.log(e)
}
}
}
await ["client", "guild"].forEach(e => load_dir(e));
console.log(`${amount} Events Loaded`.brightGreen);
try {
const stringlength2 = 69;
console.log("\n")
console.log(` ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ`.bold.yellow)
console.log(` β `.bold.yellow + " ".repeat(-1 + stringlength2 - ` β `.length) + "β".bold.yellow)
console.log(` β `.bold.yellow + `Logging into the BOT...`.bold.yellow + " ".repeat(-1 + stringlength2 - ` β `.length - `Logging into the BOT...`.length) + "β".bold.yellow)
console.log(` β `.bold.yellow + " ".repeat(-1 + stringlength2 - ` β `.length) + "β".bold.yellow)
console.log(` ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ`.bold.yellow)
} catch {
/* */ }
} catch (e) {
console.log(String(e.stack).bgRed)
}
};
event: (guildMemberRoleAdd)
module.exports = (member, role) => {
console.log(member.user.tag+" acquired the role: "+ `${role.name}`);
}```
console output
channelUpdate event handler registered.
guildUpdate event handler registered.
roleUpdate event handler registered.
guildMemberUpdate event handler registered.
userUpdate event handler registered.
messageUpdate event handler registered.
presenceUpdate event handler registered.
voiceStateUpdate event handler registered
NIKU [.]#0746 acquired the role: undefined
NIKU [.]#0746 acquired the role: undefined
And it showing me client name instead of the target name
Its a nice package
But some times when the server is boosted .
Bot is not sending msg to channel.
It determines the events that will happen when someone accepts the rules. Like this:
client.on("rules", async (member, status) => {
console.log(status) // it must be True
})
When?
Would be amazing.
Hello,
its possible get specific changed permissions when i used console.log on old and new i didnt find permissions
Hey, is there a possible way to add in "guildChannelPermissionsUpdate" permissions updated list like
added MANAGE_EMOJIS permissions
deleted SEND_MESSAGES permissions
something like this.
Hello.
This library interests me, but are there any plans to add an ghostPing
event?
Thank you.
Promise:
Promise {
<rejected> TypeError: discord_js_1.Intents is not a constructor
at /home/pi/Bots/Popcorn/node_modules/discord-logs/lib/index.js:47:19
at step (/home/pi/Bots/Popcorn/node_modules/discord-logs/lib/index.js:33:23)
at Object.next (/home/pi/Bots/Popcorn/node_modules/discord-logs/lib/index.js:14:53)
at /home/pi/Bots/Popcorn/node_modules/discord-logs/lib/index.js:8:71
at new Promise (<anonymous>)
at __awaiter (/home/pi/Bots/Popcorn/node_modules/discord-logs/lib/index.js:4:12)
at module.exports (/home/pi/Bots/Popcorn/node_modules/discord-logs/lib/index.js:41:54)
at Object.<anonymous> (/home/pi/Bots/Popcorn/Structures/index.js:17:1)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
}
Reason:
TypeError: discord_js_1.Intents is not a constructor
at /home/pi/Bots/Popcorn/node_modules/discord-logs/lib/index.js:47:19
at step (/home/pi/Bots/Popcorn/node_modules/discord-logs/lib/index.js:33:23)
at Object.next (/home/pi/Bots/Popcorn/node_modules/discord-logs/lib/index.js:14:53)
at /home/pi/Bots/Popcorn/node_modules/discord-logs/lib/index.js:8:71
at new Promise (<anonymous>)
at __awaiter (/home/pi/Bots/Popcorn/node_modules/discord-logs/lib/index.js:4:12)
at module.exports (/home/pi/Bots/Popcorn/node_modules/discord-logs/lib/index.js:41:54)
at Object.<anonymous> (/home/pi/Bots/Popcorn/Structures/index.js:17:1)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
Once I Client.emit the event it works perfectly, but when I have it in my code normally like Client.on and someone boosts the server, it doesn't work, I tried to console.log maybe it's the database problem but it doesn't even emit the event when someone boost, (it doesn't log anything) so I don't really know why it is not working if it is possible to contact by any way that will be appreciated, thank you have a nice day
If member comes from other voice channel, then voiceChannelJoin will not be emited
Steps for reproduce:
const Discord = require('discord.js')
const client = new Discord.Client()
const logs = require('discord-logs')
logs(client)
client.on("voiceChannelJoin", (member, channel) => {
console.log(member.user.tag+" joined "+channel.name+"!");
});
client.login(TOKEN);
Join some channel, i.e called channel1
, you will see it logged. After that join another voice channe, i.e channel2
, and you will see it not logged.
Discord-logs: v1.7.5
Discord.js: v12.2
Make the logs when a person boost a server (:
Is there anyway you can add invite event. In which we can use them to get who invited the member
client.on('memberJoin', (member, invite) => {
console.log(member.user.tag+' invited by '+invite.creator)
})
Something like this will help us alot.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.