TRKako
TRKako
DIAdiscord.js - Imagine an app
Created by TRKako on 3/17/2024 in #djs-questions
What Im doing wrong?
damn, sorry, thx anyways
5 replies
DIAdiscord.js - Imagine an app
Created by TRKako on 9/20/2023 in #djs-questions
'message.content.toUpperCase().includes()' it's wrong? or Im missing something
here's the code in case someone need it (fixed of course)
client.on('messageCreate', async (message) => {
if(message.author.id == client.user.id) return;
if(message.content.toUpperCase('CRAZY').includes('CRAZY')){

message.reply("Crazy? I Was Crazy Once. They Locked Me In A Room. A Rubber Room. A Rubber Room With Rats. And Rats Make Me Crazy.")
}});
client.on('messageCreate', async (message) => {
if(message.author.id == client.user.id) return;
if(message.content.toUpperCase('CRAZY').includes('CRAZY')){

message.reply("Crazy? I Was Crazy Once. They Locked Me In A Room. A Rubber Room. A Rubber Room With Rats. And Rats Make Me Crazy.")
}});
7 replies
DIAdiscord.js - Imagine an app
Created by TRKako on 9/20/2023 in #djs-questions
'message.content.toUpperCase().includes()' it's wrong? or Im missing something
NepuNepu
7 replies
DIAdiscord.js - Imagine an app
Created by TRKako on 9/20/2023 in #djs-questions
'message.content.toUpperCase().includes()' it's wrong? or Im missing something
dont worry, I figured out how to make this work, ijijija
7 replies
DIAdiscord.js - Imagine an app
Created by TRKako on 9/20/2023 in #djs-questions
'message.content.toUpperCase().includes()' it's wrong? or Im missing something
oh shit you're right
7 replies
DIAdiscord.js - Imagine an app
Created by TRKako on 9/20/2023 in #djs-questions
'message.content.toUpperCase().includes()' it's wrong? or Im missing something
what
7 replies
DIAdiscord.js - Imagine an app
Created by TRKako on 8/28/2023 in #djs-questions
help with console time
sorry, im going there perro
6 replies
DIAdiscord.js - Imagine an app
Created by TRKako on 8/28/2023 in #djs-questions
help with console time
what, I didnt know that exist
6 replies
DIAdiscord.js - Imagine an app
Created by $ JJ on 7/19/2023 in #djs-questions
How can I use an prefix instead of slash?
Maybe im a bit too late for answer this and may be useless due I use this in Discord.js v13 but this probably can help you
client.on('messageCreate', async message => {
const prefix = "!"; //You can replace the ! with your prefix
const args = message.content.slice(prefix.length).split(/ +/);
const command = args.shift().toLowerCase();
if(message.content.toLowerCase().startsWith(prefix))
{
if(command === "Command_name_01" || command === "Command_alias_02" || command === "Command_alias_03"/*etc...*/){

//Command code here

}
}
});
client.on('messageCreate', async message => {
const prefix = "!"; //You can replace the ! with your prefix
const args = message.content.slice(prefix.length).split(/ +/);
const command = args.shift().toLowerCase();
if(message.content.toLowerCase().startsWith(prefix))
{
if(command === "Command_name_01" || command === "Command_alias_02" || command === "Command_alias_03"/*etc...*/){

//Command code here

}
}
});
So, your command with prefix in a text channel should be something like this:
user input: !Command_name_01
bot output: some command
user input: !Command_alias_02
bot output: same command
user input: !Command_alias_03
bot output: same command as the first two
60 replies
DIAdiscord.js - Imagine an app
Created by TRKako on 5/28/2023 in #djs-questions
Is there a way to check if server banner is just an static picture or animated?
but I can get animated server banners with v13, the issue is that I need to write something like .setImage(guild.bannerURL({format: 'gif', size: 4096, dynamic: true})) cuandoMeEnteroQueLosAmiguitosDeM
8 replies
DIAdiscord.js - Imagine an app
Created by TRKako on 5/28/2023 in #djs-questions
Is there a way to check if server banner is just an static picture or animated?
because when the file is compressed in webp the image becomes smaller than it would be as a gif/png and I personally feel that it loses quality <:8_:1002860605918683216>
8 replies
DIAdiscord.js - Imagine an app
Created by Violet on 5/10/2023 in #djs-questions
Fetching Messages
Im not sure if this is what you are asking about but maybe this can help you https://stackoverflow.com/questions/49442638/get-message-by-id-discord-js
7 replies
DIAdiscord.js - Imagine an app
Created by TRKako on 3/29/2023 in #djs-questions
Suddenly I got this error on every Interaction
16 replies
DIAdiscord.js - Imagine an app
Created by TRKako on 3/29/2023 in #djs-questions
Suddenly I got this error on every Interaction
sorry, I hadn't read well <#769862166131245066> I just read it now
16 replies