LuaN
LuaN
Explore posts from servers
RRailway
Created by LuaN on 9/27/2023 in #✋|help
My website is offline
No description
14 replies
DIAdiscord.js - Imagine an app
Created by LuaN on 8/6/2023 in #djs-questions
message.reply() function takes more than 10 minutes to send message
I'm running multiple bots on the same machine, and the problem that has been happening is that the message.reply() function is taking a long time to execute in busy chats, like general server chats. What's even weirder is that if the bot needs to reply to a message in another chat, it will do without delay.
MessageCreateEvent

if (message.content === `<@${clientID}>`) {
const helpMessage = [
'Olá, eu sou a **Kally**!',
`> Para ver meus comandos, use \`${guildSettings.preferences.prefix}ajuda\``,
`> Esta é minha versão **${
this.discord.isMaster ? 'Grátis' : 'Premium'
}**`,
]

const row = new ActionRowBuilder<ButtonBuilder>()

if (process.env.SUPPORT_LINK)
row.setComponents(
new ButtonBuilder()
.setLabel('Servidor de Suporte')
.setStyle(ButtonStyle.Link)
.setURL(process.env.SUPPORT_LINK)
)

return message.reply({
content: helpMessage.join('\n'),
components: [row],
})
}
MessageCreateEvent

if (message.content === `<@${clientID}>`) {
const helpMessage = [
'Olá, eu sou a **Kally**!',
`> Para ver meus comandos, use \`${guildSettings.preferences.prefix}ajuda\``,
`> Esta é minha versão **${
this.discord.isMaster ? 'Grátis' : 'Premium'
}**`,
]

const row = new ActionRowBuilder<ButtonBuilder>()

if (process.env.SUPPORT_LINK)
row.setComponents(
new ButtonBuilder()
.setLabel('Servidor de Suporte')
.setStyle(ButtonStyle.Link)
.setURL(process.env.SUPPORT_LINK)
)

return message.reply({
content: helpMessage.join('\n'),
components: [row],
})
}
This is not the only place that has delay, anywhere in the application I am using .reply() or .send() it will take a long time to execute just in chats with many messages being sent by users. (various messages, like conversations , interactions, etc). I don't know if it could have something to do with some kind of cache that discord.js does, or if it has a connection with the amount of bots that are running on my machine. This issue starts to happen just after few hours of running the bot
18 replies
RRailway
Created by LuaN on 8/4/2023 in #✋|help
how can i install puppeteer to my application in Railway?
I'm running a Discord bot that needs to use puppeeter to generate images, and puppeeter needs to install some dependencies on the machine in order to work, is there any way to make this run on Railway?
47 replies
RRailway
Created by LuaN on 8/2/2023 in #✋|help
Team Plan Prices
Is there any reason why a project that consumes an average of 3.5 vCPU and 4GB RAM per day would go from costing $1 per day to over $5 per day? I made a daily estimate based on the data provided on the site, and I don't know if my calculation is wrong, but in the worst case scenario using 4.3 vCPU and 5GB during the whole day: Cost per day for vCPU: $0.000463/vCPU/Minute * 4.3 vCPU * 24 hours/day * 60 minutes/hour = $0.4461584 per day for vCPU. Cost per day for GB: $0.000231/GB/Minute * 5 GB * 24 hours/day * 60 minutes/hour = $0.2773896 per day for GB. Average cost per day: $0.4461584 + $0.2773896 = $0.723548 per day. Average cost per month: $0.723548 * 30 days = $21.70644. In case I'm wrong, please clarify me better about the pricing, because the information on the site is a little confusing and in just 10 days I already have a charge of more than $ 32 going from $ 20 to $ 30 in just 2 days and my application always keeps the average consumption reported above
6 replies