-
-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Change env configuration to config.js
- Loading branch information
Showing
40 changed files
with
402 additions
and
283 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,2 @@ | ||
# Discord Bot Token | ||
BOT_TOKEN = "your_token" | ||
|
||
# Admin of the bot (User ID) | ||
# For multiple admins, separate their user IDs with commas. | ||
# OAUTH2 mode requires setting BOT_ADMIN, BOT_CLIENT_SECRET value | ||
BOT_ADMIN = "" | ||
BOT_CLIENT_SECRET = "" | ||
|
||
# Bot settings | ||
BOT_NAME = "Music Disc" | ||
BOT_PREFIX = "+" | ||
BOT_STATUS = "online" | ||
BOT_PLAYING = "+help | music" | ||
BOT_EMBEDS_COLOR = "#FFFFFF" | ||
BOT_SLASH_COMMAND = true | ||
|
||
|
||
# Volume settings | ||
DEFAULT_VOLUME = 50 | ||
MAX_VOLUME = 100 | ||
|
||
# Auto leave channel settings | ||
AUTO_LEAVE = true | ||
AUTO_LEAVE_COOLDOWN = 5000 | ||
|
||
# Show voice channel updates | ||
DISPLAY_VOICE_STATE = true | ||
|
||
|
||
# Web dashboard settings | ||
ENABLE_SITE = true | ||
SITE_PORT = 33333 | ||
SITE_LOGIN_TYPE = "USER" # "USER" | "OAUTH2" | ||
|
||
# USER mode settings | ||
SITE_USERNAME = "admin" | ||
SITE_PASSWORD = "000" | ||
|
||
# OAUTH2 mode settings | ||
SITE_OAUTH2_LINK = "" # Your OAuth2 authentication link | ||
SITE_OAUTH2_REDIRECT_URI = "http://localhost:33333/login" # Redirect link after OAuth2 authentication is complete | ||
|
||
|
||
# Local Lavalink node | ||
ENABLE_LOCAL_NODE = false | ||
LOCAL_NODE_AUTO_RESTART = true | ||
# LOCAL_NODE_DOWNLOAD_LINK = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/** | ||
* @type {import('./src/@types/index').Config} - Bot config | ||
*/ | ||
const config = { | ||
bot: { | ||
textCommand : true, // Whether to enable text command | ||
slashCommand : true, // Whether to enable slash command | ||
|
||
// OAUTH2 mode requires setting 'admin', 'clientSecret' value | ||
admin : [], // It must be the user ID (string[]) | ||
clientSecret : '', | ||
|
||
name : 'Music Disc', | ||
prefix : '-', | ||
status : 'online', // 'online' | 'idle' | 'dnd' | ||
activityType : 2, // https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types | ||
playing : '+help | music', | ||
embedsColor : '#FFFFFF', | ||
volume: { | ||
default : 50, | ||
max : 100, | ||
}, | ||
// Auto leave channel settings | ||
autoLeave: { | ||
enabled : true, | ||
cooldown : 5000, // ms | ||
}, | ||
// Show voice channel updates | ||
displayVoiceState : true, | ||
}, | ||
|
||
// Web dashboard settings | ||
webDashboard: { | ||
enabled : true, | ||
port : 33333, | ||
loginType : 'USER', // 'USER' | 'OAUTH2' | ||
|
||
// USER mode settings | ||
user: { | ||
username : 'admin', | ||
password : 'password', | ||
}, | ||
|
||
// OAUTH2 mode settings | ||
oauth2: { | ||
link : '', | ||
redirectUri : 'http://localhost:33333/login', | ||
}, | ||
|
||
// SessionManager config | ||
sessionManager: { | ||
validTime : 10 * 60 * 1000, // Session validity time (ms) (default: 10 minutes) | ||
cleanupInterval : 5 * 60 * 1000 // Timing cleaner time (ms) (default: 5 minutes) | ||
}, | ||
// IPBlocker config | ||
ipBlocker: { | ||
retryLimit : 5, // Maximum number of retries (default: 5) | ||
unlockTimeoutDuration : 5 * 60 * 1000, // Blocking time (ms) (default: 5 minutes) | ||
cleanupInterval : 5 * 60 * 1000 // Timing cleaner time (ms) (default: 5 minutes) | ||
} | ||
}, | ||
|
||
// Local Lavalink node | ||
localNode: { | ||
enabled : false, | ||
autoRestart : true, | ||
// downloadLink : 'https://github.com/lavalink-devs/Lavalink/releases/download/4.0.8/Lavalink.jar' | ||
} | ||
}; | ||
|
||
export { config }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.