TheJoshua
TheJoshua
DIAdiscord.js - Imagine an app
Created by TheJoshua on 12/11/2024 in #djs-questions
CUSTOM bot activity
Hello there, I am trying to set bot's custom activity, but failing to do so this is the code in my ready.js -- every other activity works such as Playing/Watching...
<...>

client.user.setActivity(
settings.Activities[rand].replace("{count}", client.users.cache.size),
{
type: "CUSTOM"
}
);

<...>
<...>

client.user.setActivity(
settings.Activities[rand].replace("{count}", client.users.cache.size),
{
type: "CUSTOM"
}
);

<...>
Thank you in advance
15 replies
DIAdiscord.js - Imagine an app
Created by TheJoshua on 8/9/2023 in #djs-questions
Hosting public bot
Hello there, i would like to ask anyone who is more experience with hosting public bot, how to make it public, simply, like i just need to make my code universal - not my server specific, especially when i am getting guildID - what i do when i host bots for personal use is that i create config file and there i define something like "DISCORD_GUILD_ID: <ID_HERE>" where <ID_HERE> is guild ID of my server, and every time i want to use code further like to get player's ID or whatever i used to get the config value (ID of my guild) and use that, instead, should i just grab the current guildID of the server on which the function of bot is executed? I hope you understand my concerns Thank you in advance to anyone who answer in simple terms - i only hosted discord bots for personal use, how to host them publicly; what to change in code and how to make them public (just share the generated URL with predefined permissions for someone to invite it?)
8 replies