progamersischu
progamersischu
DIAdiscord.js - Imagine an app
Created by GalaXd on 10/13/2023 in #djs-questions
Attachment
Just out of curiosity. Is it illegal to save the deleted pictures(when someone deletes something illegal) on a data server(private server hosted somewhere in a data center)?
17 replies
DIAdiscord.js - Imagine an app
Created by GalaXd on 10/13/2023 in #djs-questions
Attachment
I am not sure if this is true but the message.attachments property should have an Buffer inside it, maybe this is still there when you use the message on messagedelete event
17 replies
DIAdiscord.js - Imagine an app
Created by PadowYT2 on 9/19/2023 in #djs-questions
Discoverable servers support
DJS doesn't has something like this implemented. I think you refer to the video of ntts?
11 replies
DIAdiscord.js - Imagine an app
Created by Saint on 9/18/2023 in #djs-questions
Storing Giveaway information
You could use keyv
12 replies
DIAdiscord.js - Imagine an app
Created by progamersischu on 9/18/2023 in #djs-questions
Log if user got disconnected and from who?
Found the error. But like I do it, it isn't possible that way. I thought that every action is logged seperatly in the audit log but it just counts to 1,2,3,4,.. till like a certain time passed
14 replies
DIAdiscord.js - Imagine an app
Created by progamersischu on 9/18/2023 in #djs-questions
Log if user got disconnected and from who?
I will do that thx
14 replies
DIAdiscord.js - Imagine an app
Created by progamersischu on 9/18/2023 in #djs-questions
Log if user got disconnected and from who?
Yeah. But still...doesn't make sense. I mean. I get a value for newstate and newstate.guild but after 5 seconds it tells me that its undefined
14 replies
DIAdiscord.js - Imagine an app
Created by progamersischu on 9/18/2023 in #djs-questions
Log if user got disconnected and from who?
Because otherwise my main file is going to be super big
14 replies
DIAdiscord.js - Imagine an app
Created by progamersischu on 9/18/2023 in #djs-questions
Log if user got disconnected and from who?
Want to do it in different files.
14 replies
DIAdiscord.js - Imagine an app
Created by progamersischu on 9/18/2023 in #djs-questions
Log if user got disconnected and from who?
No description
14 replies
DIAdiscord.js - Imagine an app
Created by progamersischu on 9/18/2023 in #djs-questions
Log if user got disconnected and from who?
client.on("voiceStateUpdate",async (oldstate,newstate) => { await betterlogs.handler({type: "voicestateupdate", oldstate: oldstate, newstate: newstate}) ....
14 replies
DIAdiscord.js - Imagine an app
Created by progamersischu on 9/18/2023 in #djs-questions
Log if user got disconnected and from who?
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
14 replies
DIAdiscord.js - Imagine an app
Created by progamersischu on 9/18/2023 in #djs-questions
Log if user got disconnected and from who?
<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] }
}
14 replies
DIAdiscord.js - Imagine an app
Created by progamersischu on 9/18/2023 in #djs-questions
Log if user got disconnected and from who?
And the guild obj:
14 replies
DIAdiscord.js - Imagine an app
Created by progamersischu on 9/18/2023 in #djs-questions
Log if user got disconnected and from who?
voicestateupdate : async function(oldstate, newstate) {
console.log(newstate?.guild)
if(!newstate?.channel){
await newstate.guild.fetchAuditLogs({type: discordjs.AuditLogEvent.MemberDisconnect}).then(audit => {
let first = audit.entries.first()
if(!first) return;
console.log(first.createdTimestamp, Date.now() - 2000, Date.now() + 2000, Date.now())
if( first.createdTimestamp == Date.now() || first.createdTimestamp > Date.now() - 2000){
console.log(newstate.member.user.tag + " was disconnected from " + oldstate.channel.name + " by " + first.executor.tag + " (" + first.executor.id + ")")
}
})
}
}
voicestateupdate : async function(oldstate, newstate) {
console.log(newstate?.guild)
if(!newstate?.channel){
await newstate.guild.fetchAuditLogs({type: discordjs.AuditLogEvent.MemberDisconnect}).then(audit => {
let first = audit.entries.first()
if(!first) return;
console.log(first.createdTimestamp, Date.now() - 2000, Date.now() + 2000, Date.now())
if( first.createdTimestamp == Date.now() || first.createdTimestamp > Date.now() - 2000){
console.log(newstate.member.user.tag + " was disconnected from " + oldstate.channel.name + " by " + first.executor.tag + " (" + first.executor.id + ")")
}
})
}
}
14 replies
DIAdiscord.js - Imagine an app
Created by whos there on 9/12/2023 in #djs-questions
Don't DM a user with disabled DMs?
When u have the send Method as a Promise then u just simply .catch() the Error when u can't send someone a DM
6 replies
DIAdiscord.js - Imagine an app
Created by progamersischu on 8/6/2023 in #djs-questions
Get every User in a Voice Channel with REST/CORE
That explains a lot. I thought the cache works like that on restart it gets cleared. But if it uses the other events to retrieve data for the VoiceState then it makes more sense to me
13 replies
DIAdiscord.js - Imagine an app
Created by progamersischu on 8/6/2023 in #djs-questions
Get every User in a Voice Channel with REST/CORE
I only use core to use discords data to use it from my bot on another appliaction/website etc.
13 replies
DIAdiscord.js - Imagine an app
Created by progamersischu on 8/6/2023 in #djs-questions
Get every User in a Voice Channel with REST/CORE
Thx
13 replies
DIAdiscord.js - Imagine an app
Created by progamersischu on 8/6/2023 in #djs-questions
Get every User in a Voice Channel with REST/CORE
Then I am confused why I can retrieve users from the different channels. Even if the bot was restarted and the cache cleared.
13 replies