bruhbruhbruhwho
bruhbruhbruhwho
DIAdiscord.js - Imagine an app
Created by bruhbruhbruhwho on 10/9/2023 in #djs-questions
Creating a hyperlink
No description
17 replies
DIAdiscord.js - Imagine an app
Created by bruhbruhbruhwho on 10/3/2023 in #djs-questions
DiscordAPIError[10070]: Unknown Guild Scheduled Event
I've been working on a bot that handles Guild Scheduled Events. While implementing the GuildScheduledEventDelete event, I ran into the following error while trying to fetch the subscribers.
throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
^

DiscordAPIError[10070]: Unknown Guild Scheduled Event

requestBody: { files: undefined, json: undefined },
rawError: { message: 'Unknown Guild Scheduled Event', code: 10070 },
code: 10070,
status: 404,
method: 'GET',
url: 'https://discord.com/api/v10/guilds/1150519158367334490/scheduled-events/1158664297224863815/users'
}
throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
^

DiscordAPIError[10070]: Unknown Guild Scheduled Event

requestBody: { files: undefined, json: undefined },
rawError: { message: 'Unknown Guild Scheduled Event', code: 10070 },
code: 10070,
status: 404,
method: 'GET',
url: 'https://discord.com/api/v10/guilds/1150519158367334490/scheduled-events/1158664297224863815/users'
}
This is the code I have right now:
const dotenv = require('dotenv');
dotenv.config();

const { Events } = require('discord.js');

module.exports = {
name : Events.GuildScheduledEventDelete,
once: false,
async execute(scheduledEvent) {
if (scheduledEvent.description.includes('Practice')) {
try {
const users = scheduledEvent.fetchSubscribers();
console.log(users);
console.log(typeof users);
} catch (error) {
console.error(error);
}
}
},
};
const dotenv = require('dotenv');
dotenv.config();

const { Events } = require('discord.js');

module.exports = {
name : Events.GuildScheduledEventDelete,
once: false,
async execute(scheduledEvent) {
if (scheduledEvent.description.includes('Practice')) {
try {
const users = scheduledEvent.fetchSubscribers();
console.log(users);
console.log(typeof users);
} catch (error) {
console.error(error);
}
}
},
};
I'm not sure what the error is, any help would be much appreciated.
14 replies
DIAdiscord.js - Imagine an app
Created by bruhbruhbruhwho on 10/1/2023 in #djs-questions
Setting a limit on number of subscribers to a Scheduled Event
Is there any way to set a maximum capacity of number of people to a scheduled event? There doesn't seem to be an option for it, so I was wondering if it would be able to code a way to "lock" someone out or prevent them from subscribing once the number of people interested reaches a certain number.
3 replies