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:
parent
16188702f3
commit
036d46f08a
2 changed files with 5 additions and 2 deletions
|
@ -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, {
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue