quaint racoon
quaint racoon
DIAdiscord.js - Imagine an app
Created by quaint racoon on 11/4/2023 in #djs-questions
error cant set permissions as old channel
No description
7 replies
DIAdiscord.js - Imagine an app
Created by quaint racoon on 11/4/2023 in #djs-questions
server.roles is undefined any idea why?
im trying to create new role with server.roles.create() but its saying that server.roles is undefined
3 replies
DIAdiscord.js - Imagine an app
Created by quaint racoon on 11/4/2023 in #djs-questions
can I use channel.clone for 2 servers
is it possible to use channel.clone to copy a channel from 1 server to another and can I copy sectors too?
21 replies
DIAdiscord.js - Imagine an app
Created by quaint racoon on 11/1/2023 in #djs-questions
it wont lemme set a variable as the key of the object
channel.permissionOverwrites.edit(message.guild.id, {
args[3]: false,
}).catch((err)=>{
message.reply(err)
});
channel.permissionOverwrites.edit(message.guild.id, {
args[3]: false,
}).catch((err)=>{
message.reply(err)
});
3 replies
DIAdiscord.js - Imagine an app
Created by quaint racoon on 11/1/2023 in #djs-questions
how to get all channel names?
Array.from(await message.guild.channels.cache.values())
Array.from(await message.guild.channels.cache.values())
7 replies
DIAdiscord.js - Imagine an app
Created by quaint racoon on 10/31/2023 in #djs-questions
help bot doesn't respond to messageCreate
so I have all intents turned on inside dev portal I dm it !ticket and the bot remains silent and the console remains empty any ideas why??? code:
import express from 'express'
const app = express();
const port = 3000
import path from "path"
const file = "main.html"
import { REST, Routes } from 'discord.js';
import bodyParser from 'body-parser'
import { readFileSync } from "fs"
import Discord from "discord.js"
import { GatewayIntentBits, Client, Collection } from 'discord.js';
import Database from "@replit/database"
const db = new Database()
//await db.set("verification codes",JSON.stringify({}))
const client = new Client({

intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildPresences,
GatewayIntentBits.DirectMessages
],
});


app.get('/', (req, res) => {
res.sendFile(path.resolve(file))
})

app.listen(port, () =>
console.log(`connected to port:${port}`)
);




import { readdirSync } from "fs"
const commands = []
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
client.slashcommands = new Collection();
const foldersPath = path.join(__dirname, 'commands');
const commandFiles = readdirSync(foldersPath).filter(file => file.endsWith('.mjs'));



for (const file of commandFiles) {
const filePath = path.join(foldersPath, file);
const { command } = await import(`${filePath}`);
if ('data' in command && 'run' in command) {
commands.push(command.data.toJSON())
client.slashcommands.set(command.data.name, command);
} else {
console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "run" property.`);
}
}


const rest = new REST().setToken(process.env.TOKEN);
import express from 'express'
const app = express();
const port = 3000
import path from "path"
const file = "main.html"
import { REST, Routes } from 'discord.js';
import bodyParser from 'body-parser'
import { readFileSync } from "fs"
import Discord from "discord.js"
import { GatewayIntentBits, Client, Collection } from 'discord.js';
import Database from "@replit/database"
const db = new Database()
//await db.set("verification codes",JSON.stringify({}))
const client = new Client({

intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildPresences,
GatewayIntentBits.DirectMessages
],
});


app.get('/', (req, res) => {
res.sendFile(path.resolve(file))
})

app.listen(port, () =>
console.log(`connected to port:${port}`)
);




import { readdirSync } from "fs"
const commands = []
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
client.slashcommands = new Collection();
const foldersPath = path.join(__dirname, 'commands');
const commandFiles = readdirSync(foldersPath).filter(file => file.endsWith('.mjs'));



for (const file of commandFiles) {
const filePath = path.join(foldersPath, file);
const { command } = await import(`${filePath}`);
if ('data' in command && 'run' in command) {
commands.push(command.data.toJSON())
client.slashcommands.set(command.data.name, command);
} else {
console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "run" property.`);
}
}


const rest = new REST().setToken(process.env.TOKEN);
27 replies
DIAdiscord.js - Imagine an app
Created by quaint racoon on 10/31/2023 in #djs-questions
how to get ammount of people inside a certain guild?
how to get ammount of people inside a certain guild? msg.guild.size doesnt work
5 replies