Bot wont go online

when I try to run the script yarn dev I get this problem
Solution:
Hey @Shen (Currently Sick), The port used by the api plugin is already used so cannot connect. Try to change the port use this one 🙂...
Solution
Swiizyy
Swiizyy•440d ago
Hey @Shen (Currently Sick), The port used by the api plugin is already used so cannot connect. Try to change the port use this one 🙂
Krish
Krish•440d ago
Port 4000 is already in use by some other program and it's a djs question, nothing related to sapphire
Swiizyy
Swiizyy•440d ago
const { OAuth2Scopes } = require('discord.js');

{
auth: {
// The application/client ID of your bot
// You can find this at https://discord.com/developers/applications
id: '',
// The client secret of your bot
// You can find this at https://discord.com/developers/applications
secret: '',
// The name of the authentication cookie
cookie: 'SAPPHIRE_AUTH',
// The URL that users should be redirected to after a successful authentication
redirect: '',
// The scopes that should be given to the authentication
scopes: [OAuth2Scopes.Identify],
// Transformers to transform the raw data from Discord to a different structure.
transformers: []
},
// The prefix for all routes, e.g. / or v1/
prefix: '',
// The origin header to be set on every request at 'Access-Control-Allow-Origin.
origin: '*',
// Any options passed to the NodeJS "net" internal server.listen function
// See https://nodejs.org/api/net.html#net_server_listen_options_callback
listenOptions: {
// The port the API will listen on
port: 4000
}
}
const { OAuth2Scopes } = require('discord.js');

{
auth: {
// The application/client ID of your bot
// You can find this at https://discord.com/developers/applications
id: '',
// The client secret of your bot
// You can find this at https://discord.com/developers/applications
secret: '',
// The name of the authentication cookie
cookie: 'SAPPHIRE_AUTH',
// The URL that users should be redirected to after a successful authentication
redirect: '',
// The scopes that should be given to the authentication
scopes: [OAuth2Scopes.Identify],
// Transformers to transform the raw data from Discord to a different structure.
transformers: []
},
// The prefix for all routes, e.g. / or v1/
prefix: '',
// The origin header to be set on every request at 'Access-Control-Allow-Origin.
origin: '*',
// Any options passed to the NodeJS "net" internal server.listen function
// See https://nodejs.org/api/net.html#net_server_listen_options_callback
listenOptions: {
// The port the API will listen on
port: 4000
}
}
If he must modify the port parameter in the listenoptions with an unused port this is part of sapphire not discord
Krish
Krish•440d ago
sapphire doesn't aquire any ports by default pepeHmm
Favna
Favna•440d ago
it does for the api plugin.
Krish
Krish•440d ago
"by default" doesn't include plugins
Ben
Ben•440d ago
The cli does pull in the api plugin so “default” kinda depends on if your using the cli or not.
Favna
Favna•440d ago
the "default" template no longer does FYI. Only the "complete" one does. For TypeScript anyway.
Want results from more Discord servers?
Add your server
More Posts
GuildDelete Event somehow gets triggered when I restart my BotI have no idea whats happening but if my bot (docker container) restarts, this notification gets senTypeError: Class extends value undefined is not a constructor or nullHey, newbie here in both TypeScript and Sapphire, and I'm trying to build a command but I'm getting THREAD_CREATE event Listener run method argumentsWhat I want to do: I want to inspect the id of the parent channel where the thread was created. TheCommand info command issueI have a command info command, but when I try to get information on a command called "flags" it retuawait args.pick("member");how to enable this? https://discord.com/channels/737141877803057244/737142071319855105/107804884825Command info command issueI have a command info command, but when I try to get information on a command called "flags" it retuRunning in productionHey! What's the recommended method for starting up a node app in production? Specifically for DiscorspeakerName translation in FFXIVIpcChatHello everyone, I'm using ffxiv-pcap to read chat messages using the Sapphire Struct for chat messagClearing registered slash commandsHello đź‘‹ I would like to know if there's a system provided by Sapphire to automatically clear previDocker being goofyI have no idea why Docker is being all goofy, it's saying that my discord token is invalid, but it'sReferenceError: [ENV] BOT_OWNER_IDS - The key must be an array, but is empty or undefined.I am using `@skyra/env-utilities` and when I start up my bot, I get the error reported in the title How can I turn a joinedTimestamp into this Discord TimestampThe one that automatically shows you like how long ago this timestamp wasHow to use `@sapphire/shapeshift ` dateValid & stringRegexI have a slash command that needs to take in a date input in the format of `YYYY-MM-DD`. I want to Access extended sapphire clientFollowing usecase: I extended the sapphire client in order to create custom collections etc. Is thVersion mismatch between Sapphire and dapi-typesHi, I was updating my dependencies when I encountered Discord.js' dapi-types error. I copy/pasted thWhats the syntax to require Permission X AND Y OR Z when using requiredUserPermissionswhen using `requiredUserPermissions`. Its an array so Im not sureGetting modalSubmit error over the weekendDid discord change something???How to use windows env variables using skyra env utilitiesi am trying to use CD for hosting and i have env variables set on windows, how do i access them withPattern for fetching all registered slash commandsI have some slash commands and some with subcommands and and want to introduce a `/help` slash comminteraction.showModal not workinginteraction.showModal doesnt work, I dont know why. Code: ``` this.container.logger.debug("Start Ed