@@ -260,7 +260,18 @@ async function run(ctx, argv) {
|
||||
intents.push(GatewayIntentBits.MessageContent)
|
||||
}
|
||||
|
||||
const client = new Client({ intents: intents })
|
||||
const osName =
|
||||
(typeof process !== 'undefined' && process.platform) || 'darwin'
|
||||
const client = new Client({
|
||||
intents: intents,
|
||||
ws: {
|
||||
identifyProperties: {
|
||||
os: osName,
|
||||
browser: 'bare-os',
|
||||
device: 'bare-os'
|
||||
}
|
||||
}
|
||||
})
|
||||
const pingCommand = new SlashCommandBuilder()
|
||||
.setName('ping')
|
||||
.setDescription('Replies with pong.')
|
||||
@@ -334,6 +345,14 @@ async function run(ctx, argv) {
|
||||
})
|
||||
}
|
||||
|
||||
if (Events.Raw) {
|
||||
client.on(Events.Raw, function (packet) {
|
||||
if (!loggingIn) return
|
||||
const t = packet && packet.t
|
||||
if (t) ctx.console.log('discord-bot: dispatch ' + t)
|
||||
})
|
||||
}
|
||||
|
||||
let loggingIn = true
|
||||
let loginTimer = null
|
||||
let loginTick = null
|
||||
|
||||
Reference in New Issue
Block a user