forked from Enraa/Gagbot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
46 lines (41 loc) · 1.42 KB
/
test.js
File metadata and controls
46 lines (41 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const discord = require('discord.js')
const fs = require('fs')
const path = require('path');
const admZip = require('adm-zip');
const { getTimestringForZip } = require("./functions/timefunctions");
const env = require('dotenv')
const nlp = require('compromise');
const nlpSpeech = require('compromise-speech');
const { getChastity } = require('./functions/vibefunctions.js');
const { setUpToys } = require('./functions/toyfunctions.js');
nlp.extend(nlpSpeech);
env.config();
const client = new discord.Client({
intents: [
discord.GatewayIntentBits.Guilds,
discord.GatewayIntentBits.GuildMessages,
discord.GatewayIntentBits.MessageContent,
discord.GatewayIntentBits.GuildMembers
]
})
client.on("clientReady", async () => {
// This is run once we’re logged in!
console.log(`Logged in as ${client.user.tag}!`)
try {
await client.application.fetch();
console.log(`Bot is owned by user ID ${client?.application?.owner.id}`)
}
catch (err) {
console.log(err)
}
// List all guilds the server is in.
let allguilds = await client.guilds.fetch();
let guilds = [];
for (const guild of allguilds) {
let guildfetched = await client.guilds.fetch(guild[0])
let guildmembers = await guildfetched.members.fetch()
console.log(guildmembers.get("125093095405518850"))
}
console.log(guilds)
})
client.login(process.env.DISCORDBOTTOKEN)