And the guild obj:
<ref *2> Guild {
id: '583370607920545854',
name: 'ssssssssss2',
icon: '428e0939f68c4b38762bffcccedc9ccd',
features: [],
commands: <ref *1> GuildApplicationCommandManager {
permissions: ApplicationCommandPermissionsManager {
manager: [Circular *1],
guild: [Circular *2],
guildId: '583370607920545854',
commandId: null
},
guild: [Circular *2]
},
members: GuildMemberManager { guild: [Circular *2] },
channels: GuildChannelManager { guild: [Circular *2] },
bans: GuildBanManager { guild: [Circular *2] },
roles: RoleManager { guild: [Circular *2] },
presences: PresenceManager {},
voiceStates: VoiceStateManager { guild: [Circular *2] },
stageInstances: StageInstanceManager { guild: [Circular *2] },
invites: GuildInviteManager { guild: [Circular *2] },
scheduledEvents: GuildScheduledEventManager { guild: [Circular *2] },
autoModerationRules: AutoModerationRuleManager { guild: [Circular *2] },
available: true,
shardId: 0,
splash: null,
banner: null,
description: null,
verificationLevel: 0,
vanityURLCode: null,
nsfwLevel: 0,
premiumSubscriptionCount: 0,
discoverySplash: null,
memberCount: 8,
large: false,
premiumProgressBarEnabled: false,
applicationId: null,
afkTimeout: 300,
afkChannelId: null,
systemChannelId: null,
premiumTier: 0,
widgetEnabled: null,
widgetChannelId: null,
explicitContentFilter: 0,
mfaLevel: 0,
joinedTimestamp: 1677287925024,
defaultMessageNotifications: 0,
systemChannelFlags: SystemChannelFlagsBitField { bitfield: 0 },
maximumMembers: 500000,
maximumPresences: null,
maxVideoChannelUsers: 25,
approximateMemberCount: null,
approximatePresenceCount: null,
vanityURLUses: null,
rulesChannelId: null,
publicUpdatesChannelId: null,
preferredLocale: 'en-US',
ownerId: '539044928953516032',
emojis: GuildEmojiManager { guild: [Circular *2] },
stickers: GuildStickerManager { guild: [Circular *2] }
}
<ref *2> Guild {
id: '583370607920545854',
name: 'ssssssssss2',
icon: '428e0939f68c4b38762bffcccedc9ccd',
features: [],
commands: <ref *1> GuildApplicationCommandManager {
permissions: ApplicationCommandPermissionsManager {
manager: [Circular *1],
guild: [Circular *2],
guildId: '583370607920545854',
commandId: null
},
guild: [Circular *2]
},
members: GuildMemberManager { guild: [Circular *2] },
channels: GuildChannelManager { guild: [Circular *2] },
bans: GuildBanManager { guild: [Circular *2] },
roles: RoleManager { guild: [Circular *2] },
presences: PresenceManager {},
voiceStates: VoiceStateManager { guild: [Circular *2] },
stageInstances: StageInstanceManager { guild: [Circular *2] },
invites: GuildInviteManager { guild: [Circular *2] },
scheduledEvents: GuildScheduledEventManager { guild: [Circular *2] },
autoModerationRules: AutoModerationRuleManager { guild: [Circular *2] },
available: true,
shardId: 0,
splash: null,
banner: null,
description: null,
verificationLevel: 0,
vanityURLCode: null,
nsfwLevel: 0,
premiumSubscriptionCount: 0,
discoverySplash: null,
memberCount: 8,
large: false,
premiumProgressBarEnabled: false,
applicationId: null,
afkTimeout: 300,
afkChannelId: null,
systemChannelId: null,
premiumTier: 0,
widgetEnabled: null,
widgetChannelId: null,
explicitContentFilter: 0,
mfaLevel: 0,
joinedTimestamp: 1677287925024,
defaultMessageNotifications: 0,
systemChannelFlags: SystemChannelFlagsBitField { bitfield: 0 },
maximumMembers: 500000,
maximumPresences: null,
maxVideoChannelUsers: 25,
approximateMemberCount: null,
approximatePresenceCount: null,
vanityURLUses: null,
rulesChannelId: null,
publicUpdatesChannelId: null,
preferredLocale: 'en-US',
ownerId: '539044928953516032',
emojis: GuildEmojiManager { guild: [Circular *2] },
stickers: GuildStickerManager { guild: [Circular *2] }
}
Because somehow I get undefined sometimes with newstate.channel or smth else when it's defined when I log it. A bit bugged I guess
client.on("voiceStateUpdate",async (oldstate,newstate) => {
await betterlogs.handler({type: "voicestateupdate", oldstate: oldstate, newstate: newstate})
....