Yuuki | ユウキ
DIAdiscord.js - Imagine an app
•Created by Yuuki | ユウキ on 8/21/2023 in #djs-questions
Optimizing Image Processing, Storage, and Strategies to Prevent Alts and Botting: Seeking Advice
Oops wrong forum
3 replies
DIAdiscord.js - Imagine an app
•Created by Yuuki | ユウキ on 7/30/2023 in #djs-questions
[CLOSED] Question regarding Unicode and Custom emojis
Oh yeah. Thanks!
9 replies
DIAdiscord.js - Imagine an app
•Created by Yuuki | ユウキ on 7/30/2023 in #djs-questions
[CLOSED] Question regarding Unicode and Custom emojis
I guess I could just do a regex / length check to see if it is a normal unicode emoji or a guild emoji.
9 replies
DIAdiscord.js - Imagine an app
•Created by Yuuki | ユウキ on 7/30/2023 in #djs-questions
[CLOSED] Question regarding Unicode and Custom emojis
9 replies
DIAdiscord.js - Imagine an app
•Created by Yuuki | ユウキ on 7/30/2023 in #djs-questions
[CLOSED] Question regarding Unicode and Custom emojis
My question is how could I check if an emoji is a valid discord unicode emoji like
:fire: :one:
and so on?9 replies
DIAdiscord.js - Imagine an app
•Created by Yuuki | ユウキ on 7/30/2023 in #djs-questions
[CLOSED] Question regarding Unicode and Custom emojis
Yeah, I'm sorry. I was talking about guild emojis using the format you mentioned.
9 replies
DIAdiscord.js - Imagine an app
•Created by Yuuki | ユウキ on 7/28/2023 in #djs-questions
[CLOSED] A question regarding discord.js with types. (TypeScript)
I learned some new things though so thanks again!
14 replies
DIAdiscord.js - Imagine an app
•Created by Yuuki | ユウキ on 7/28/2023 in #djs-questions
[CLOSED] A question regarding discord.js with types. (TypeScript)
also, how did I miss this lmao
Before I switched to using typescript in this project I was using
inter.member.user
to get the user since the member property exists on both command types.
But now I can just simply use (inter instanceof ChatInputCommandInteraction) ? (inter.user.id ) : inter.author.id;
14 replies
DIAdiscord.js - Imagine an app
•Created by Yuuki | ユウキ on 7/28/2023 in #djs-questions
[CLOSED] A question regarding discord.js with types. (TypeScript)
Yea, well.. it is definitely a crazy idea to handle both type of commands in the block/file, but I didn't want to write separate code for each of them, now I can just set what type of the command is (normal, slash or both) and handle them at the same time. I also thought about merging the types but that would just make me more work.. as you said, replying would be some next level devilish thing
14 replies
DIAdiscord.js - Imagine an app
•Created by Yuuki | ユウキ on 7/28/2023 in #djs-questions
[CLOSED] A question regarding discord.js with types. (TypeScript)
Ahh nice! Forgot about the nullish coalescing op or whatever it is called. I also have to check if "inter" is an instance of
ChatInputCommandInteraction
to use the inChachedGuild typeguard right?14 replies
DIAdiscord.js - Imagine an app
•Created by Yuuki | ユウキ on 7/28/2023 in #djs-questions
[CLOSED] A question regarding discord.js with types. (TypeScript)
(I'm casting the avatar url to a string since the property "iconURL" in the setAuthor() fn only accepts a
string | undefined
and not string | null
)14 replies
DIAdiscord.js - Imagine an app
•Created by Yuuki | ユウキ on 7/28/2023 in #djs-questions
[CLOSED] A question regarding discord.js with types. (TypeScript)
14 replies
DIAdiscord.js - Imagine an app
•Created by Yuuki | ユウキ on 7/28/2023 in #djs-questions
[CLOSED] A question regarding discord.js with types. (TypeScript)
lmao, since I'm now using the
ChatInputCommandInteraction
and not CommandInteraction
I don't have to handle OptionResolvers like I did when I wrote the post, so you're right. This is the best solution handling them!
Many thanks!14 replies
DIAdiscord.js - Imagine an app
•Created by doqe on 7/29/2023 in #djs-questions
Property 'cmds' does not exist on type 'Client<boolean>'
Ohh, someon answered already, my bad
9 replies
DIAdiscord.js - Imagine an app
•Created by doqe on 7/29/2023 in #djs-questions
Property 'cmds' does not exist on type 'Client<boolean>'
I can give you the straight up solution as well if you want to.
9 replies
DIAdiscord.js - Imagine an app
•Created by doqe on 7/29/2023 in #djs-questions
Property 'cmds' does not exist on type 'Client<boolean>'
9 replies
DIAdiscord.js - Imagine an app
•Created by doqe on 7/29/2023 in #djs-questions
Property 'cmds' does not exist on type 'Client<boolean>'
You can probably just make your own interface that extends the discord.js Client.
9 replies
DIAdiscord.js - Imagine an app
•Created by KaktusgamingYT on 7/29/2023 in #djs-questions
Cannot read properties of undefined (reading 'applicationGuildCommands')
at line
6 replies
DIAdiscord.js - Imagine an app
•Created by KaktusgamingYT on 7/29/2023 in #djs-questions
Cannot read properties of undefined (reading 'applicationGuildCommands')
There is a typo in your code.
6 replies
DIAdiscord.js - Imagine an app
•Created by Yuuki | ユウキ on 7/28/2023 in #djs-questions
[CLOSED] A question regarding discord.js with types. (TypeScript)
Hmm.. I could just do it like
instead of
is this a bad approach?
14 replies