Youssef
Youssef
Explore posts from servers
SIASapphire - Imagine a framework
Created by Youssef on 11/9/2024 in #sapphire-support
Sapphire not updating the command
No description
8 replies
SIASapphire - Imagine a framework
Created by Youssef on 9/19/2024 in #sapphire-support
chatInputCommandDenied not emiting
No description
6 replies
SIASapphire - Imagine a framework
Created by Youssef on 9/2/2024 in #sapphire-support
preconditions implementation
So i have some preconditions that check the database if the user is a staff or something. but each of them fetch the database, and it's useless to do 3 requests for the same data can i somehow specify some data to the precondition or is there a way like i fetch the data on the interaction run the run the preconditions?
6 replies
SIASapphire - Imagine a framework
Created by Youssef on 8/31/2024 in #sapphire-support
Coodown
Can i reset the cooldown for a specific command for a specific user?
29 replies
DIAdiscord.js - Imagine an app
Created by Youssef on 7/22/2024 in #djs-questions
Argument of type 'ButtonStyle.Link' is not assignable to parameter of type 'ButtonStyle'
Argument of type 'ButtonStyle.Link' is not assignable to parameter of type 'ButtonStyle'.ts(2345)
Argument of type 'ButtonStyle.Link' is not assignable to parameter of type 'ButtonStyle'.ts(2345)
Im using @discord.js/core with @discordjs/builders for the ButtonBuilder and discord-api-types/v10 for the ButtonStyle Versions: discord-api-types: "^0.37.92" @discordjs/core: "^1.2.0", @discordjs/builders: "^1.8.2",
32 replies
SIASapphire - Imagine a framework
Created by Youssef on 6/27/2024 in #sapphire-support
Error [ERR_REQUIRE_ESM]: require() of ES Module
So im getting this errror about 3 times for different packages
Error when loading 'commands\Colors\average-colors.js': Error [ERR_REQUIRE_ESM]: require() of ES Module \node_modules\color-thief-ts\dist\browser.js from dist\commands\Colors\average-colors.js not supported.
Instead change the require of browser.js in dist\commands\Colors\average-colors.js to a dynamic import() which is available in all CommonJS modules.

Error when loading 'dist\commands\Colors\color-info.js': Error [ERR_REQUIRE_ESM]: require() of ES Module node_modules\mime\dist\src\index.js from dist\services\functions\Images.js not supported.
Instead change the require of index.js in dist\services\functions\Images.js to a dynamic import() which is available in all CommonJS modules.
de: 'ERR_REQUIRE_ESM'
}
Error when loading 'dist\commands\Colors\random-color.js': Error [ERR_REQUIRE_ESM]: require() of ES Module \node_modules\mime\dist\src\index.js from ist\services\functions\Images.js not supported.
Instead change the require of index.js in ist\services\functions\Images.js to a dynamic import() which is available in all CommonJS modules.
: 'ERR_REQUIRE_ESM'
}
Error when loading 'C:\Users\USER\Desktop\Kayla\dist\components\menus\colors.js': Error [ERR_REQUIRE_ESM]: require() of ES Modulea\node_modules\mime\dist\src\index.js fromdist\services\functions\Images.js not supported.
Instead change the require of index.js in ist\services\functions\Images.js to a dynamic import() which is available in all CommonJS modules.

Error when loading 'commands\Colors\average-colors.js': Error [ERR_REQUIRE_ESM]: require() of ES Module \node_modules\color-thief-ts\dist\browser.js from dist\commands\Colors\average-colors.js not supported.
Instead change the require of browser.js in dist\commands\Colors\average-colors.js to a dynamic import() which is available in all CommonJS modules.

Error when loading 'dist\commands\Colors\color-info.js': Error [ERR_REQUIRE_ESM]: require() of ES Module node_modules\mime\dist\src\index.js from dist\services\functions\Images.js not supported.
Instead change the require of index.js in dist\services\functions\Images.js to a dynamic import() which is available in all CommonJS modules.
de: 'ERR_REQUIRE_ESM'
}
Error when loading 'dist\commands\Colors\random-color.js': Error [ERR_REQUIRE_ESM]: require() of ES Module \node_modules\mime\dist\src\index.js from ist\services\functions\Images.js not supported.
Instead change the require of index.js in ist\services\functions\Images.js to a dynamic import() which is available in all CommonJS modules.
: 'ERR_REQUIRE_ESM'
}
Error when loading 'C:\Users\USER\Desktop\Kayla\dist\components\menus\colors.js': Error [ERR_REQUIRE_ESM]: require() of ES Modulea\node_modules\mime\dist\src\index.js fromdist\services\functions\Images.js not supported.
Instead change the require of index.js in ist\services\functions\Images.js to a dynamic import() which is available in all CommonJS modules.

32 replies
SIASapphire - Imagine a framework
Created by Youssef on 5/16/2024 in #sapphire-support
Custom slash commands registration
No description
164 replies
SIASapphire - Imagine a framework
Created by Youssef on 3/23/2024 in #sapphire-support
DiscordAPIError[10062]: Unknown interaction
No description
5 replies
SIASapphire - Imagine a framework
Created by Youssef on 8/20/2023 in #sapphire-support
ts-node vs tsc
when i compile with tsc the code works fine, but with ts-code it stops for some reasons
38 replies
DIAdiscord.js - Imagine an app
Created by Youssef on 8/10/2023 in #djs-questions
The expected type comes from property 'content' which is declared here on type 'InteractionReplyOpti
const type: string = this.options.interaction.deferred || this.options.interaction.replied ? "editReply" : "reply";

await this.options.interaction[type]({
// code
const type: string = this.options.interaction.deferred || this.options.interaction.replied ? "editReply" : "reply";

await this.options.interaction[type]({
// code
like this it don't cause any problems but when i specify the type like this
const type: "reply" | "editReply" = this.options.interaction.deferred || this.options.interaction.replied ? "editReply" : "reply";
const type: "reply" | "editReply" = this.options.interaction.deferred || this.options.interaction.replied ? "editReply" : "reply";
it give me this error
No overload matches this call.
Overload 1 of 2, '(options: InteractionReplyOptions & { fetchReply: true; } & (string | MessagePayload | InteractionEditReplyOptions)): Promise<...>', gave the following error.
Type 'null' is not assignable to type 'string | undefined'.
Overload 2 of 2, '(options: (string | MessagePayload | InteractionReplyOptions) & (string | MessagePayload | InteractionEditReplyOptions)): Promise<...> | Promise<...>', gave the following error.
Type 'null' is not assignable to type 'string | undefined'.ts(2769)
index.d.ts(5888, 3): The expected type comes from property 'content' which is declared here on type 'InteractionReplyOptions & { fetchReply: true; } & (string | MessagePayload | InteractionEditReplyOptions)'
No overload matches this call.
Overload 1 of 2, '(options: InteractionReplyOptions & { fetchReply: true; } & (string | MessagePayload | InteractionEditReplyOptions)): Promise<...>', gave the following error.
Type 'null' is not assignable to type 'string | undefined'.
Overload 2 of 2, '(options: (string | MessagePayload | InteractionReplyOptions) & (string | MessagePayload | InteractionEditReplyOptions)): Promise<...> | Promise<...>', gave the following error.
Type 'null' is not assignable to type 'string | undefined'.ts(2769)
index.d.ts(5888, 3): The expected type comes from property 'content' which is declared here on type 'InteractionReplyOptions & { fetchReply: true; } & (string | MessagePayload | InteractionEditReplyOptions)'
15 replies
SIASapphire - Imagine a framework
Created by Youssef on 7/21/2023 in #sapphire-support
Property 'chatInputRun' in type 'OwnerOnlyPrecondition' is not assignable to the same property
7 replies
DIAdiscord.js - Imagine an app
Created by Youssef on 7/20/2023 in #djs-questions
Get All users banners
So im trying to get all banners of server members.. what im doing is fetching all members let members = await guild.members.fetch(); but all the members here have banners as null. ik they need to be force fetched. so i tried something like this
let banners = [];
members.forEach(async (member) => {
const user = await member.fetch({ force: true });
console.log(user.banner)
if (user.banner) banners.push(user.banner)
})
let banners = [];
members.forEach(async (member) => {
const user = await member.fetch({ force: true });
console.log(user.banner)
if (user.banner) banners.push(user.banner)
})
but it still gives the same output
34 replies
DIAdiscord.js - Imagine an app
Created by Youssef on 7/15/2023 in #djs-voice
Player emit idle event without playing
let connection = joinVoiceChannel({
channelId: voiceChannel.id,
guildId: voiceChannel.guild.id,
adapterCreator: voiceChannel.guild.voiceAdapterCreator,
group: client.user.id,
});

let player = createAudioPlayer();
let resource = createAudioResource(suraURL); // suraurl is a valid mp3


connection.subscribe(player);
player.play(resource);
let connection = joinVoiceChannel({
channelId: voiceChannel.id,
guildId: voiceChannel.guild.id,
adapterCreator: voiceChannel.guild.voiceAdapterCreator,
group: client.user.id,
});

let player = createAudioPlayer();
let resource = createAudioResource(suraURL); // suraurl is a valid mp3


connection.subscribe(player);
player.play(resource);
5 replies
DIAdiscord.js - Imagine an app
Created by Youssef on 11/20/2022 in #djs-voice
bot finished playing
How to understand that a bot has finished playing a file to start a new one?
15 replies
DIAdiscord.js - Imagine an app
Created by Youssef on 10/31/2022 in #djs-questions
Why i can't send mutiple images in one embed
Why this feature dont exist in discord.js? you can still use it with json but it will be better to use like .setImages([images array])
27 replies
DIAdiscord.js - Imagine an app
Created by Youssef on 9/7/2022 in #djs-questions
registering commands problem
24 replies
DIAdiscord.js - Imagine an app
Created by Youssef on 8/21/2022 in #djs-questions
loading Slash Commands with REST dont works
35 replies
DIAdiscord.js - Imagine an app
Created by Youssef on 8/21/2022 in #djs-questions
ImageURLOptions
why is StaticImageURLOptions and ImageURLOptions dont exist in main docs ?
9 replies
DIAdiscord.js - Imagine an app
Created by Youssef on 7/26/2022 in #djs-questions
default_member_permissions
if ('default_member_permissions' in command) { ^ TypeError: Cannot use 'in' operator to search for 'default_member_permissions' in ping
11 replies
DIAdiscord.js - Imagine an app
Created by Youssef on 7/23/2022 in #djs-voice
about Stream
i can make my bot join a voice channel and make a stream to share a video or something
14 replies