3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Fix log bugs

This commit is contained in:
Dark 2021-07-29 19:08:22 +02:00
parent 16188702f3
commit 036d46f08a
No known key found for this signature in database
GPG key ID: 384C4B4F5B1E25A8
2 changed files with 5 additions and 2 deletions

View file

@ -17,13 +17,13 @@ export const LogsVoiceStateUpdateEvt = logsEvt({
// Leave evt
meta.pluginData.state.guildLogs.log(LogType.VOICE_CHANNEL_LEAVE, {
member: memberToConfigAccessibleMember(member),
oldChannel: channelToConfigAccessibleChannel(oldChannel!),
channel: channelToConfigAccessibleChannel(oldChannel!),
});
} else if (!oldChannel && newChannel) {
// Join Evt
meta.pluginData.state.guildLogs.log(LogType.VOICE_CHANNEL_JOIN, {
member: memberToConfigAccessibleMember(member),
newChannel: channelToConfigAccessibleChannel(newChannel),
channel: channelToConfigAccessibleChannel(newChannel),
});
} else {
meta.pluginData.state.guildLogs.log(LogType.VOICE_CHANNEL_MOVE, {

View file

@ -17,6 +17,7 @@ export interface IConfigAccessibleUser {
username: string;
discriminator: string;
mention: string;
tag: string;
avatarURL?: string;
bot?: boolean;
createdAt?: number;
@ -46,6 +47,7 @@ export function userToConfigAccessibleUser(user: User | UnknownUser): IConfigAcc
username: "Unknown",
discriminator: "0000",
mention: `<@${user.id}>`,
tag: "Unknown#0000",
};
return toReturnPartial;
@ -57,6 +59,7 @@ export function userToConfigAccessibleUser(user: User | UnknownUser): IConfigAcc
username: properUser.username,
discriminator: properUser.discriminator,
mention: `<@${properUser.id}>`,
tag: properUser.tag,
avatarURL: properUser.displayAvatarURL({ dynamic: true }),
bot: properUser.bot,
createdAt: properUser.createdTimestamp,