Feature/182 setup actions #186

Merged
Vylpes merged 5 commits from feature/182-setup-actions into develop 2022-09-06 19:24:40 +01:00
6 changed files with 6 additions and 11 deletions
Showing only changes of commit aa86b3d1fe - Show all commits

View file

@ -11,6 +11,7 @@ BOT_VER=DEV
BOT_AUTHOR=Vylpes
BOT_DATE=DEV
BOT_OWNERID=147392775707426816
BOT_PREFIX=d!
ABOUT_FUNDING=https://ko-fi.com/vylpes
ABOUT_REPO=https://github.com/vylpes/vylbot-app

View file

@ -11,6 +11,7 @@ BOT_VER=3.1
BOT_AUTHOR=Vylpes
BOT_DATE=05 Sep 2022
BOT_OWNERID=147392775707426816
BOT_PREFIX=v!
ABOUT_FUNDING=https://ko-fi.com/vylpes
ABOUT_REPO=https://github.com/vylpes/vylbot-app

View file

@ -11,6 +11,7 @@ BOT_VER=3.1
BOT_AUTHOR=Vylpes
BOT_DATE=05 Sep 2022
BOT_OWNERID=147392775707426816
BOT_PREFIX=s!
ABOUT_FUNDING=https://ko-fi.com/vylpes
ABOUT_REPO=https://github.com/vylpes/vylbot-app

View file

@ -25,12 +25,10 @@ export class CoreClient extends Client {
return this._eventItems;
}
constructor(intents: number[], devmode: boolean = false) {
constructor(intents: number[]) {
super({ intents: intents });
dotenv.config();
DefaultValues.useDevPrefix = devmode;
CoreClient._commandItems = [];
CoreClient._eventItems = [];

View file

@ -17,11 +17,7 @@ export default class DefaultValues {
private static SetValues() {
if (this.values.length == 0) {
// Bot
if (this.useDevPrefix) {
this.values.push({ Key: "bot.prefix", Value: "d!" });
} else {
this.values.push({ Key: "bot.prefix", Value: "v!" });
}
this.values.push({ Key: "bot.prefix", Value: process.env.BOT_PREFIX || "v!" })
// Commands
this.values.push({ Key: "commands.disabled", Value: "" });

View file

@ -19,13 +19,11 @@ requiredConfigs.forEach(config => {
}
});
const devmode = process.argv.find(x => x.toLowerCase() == "--dev") != null;
const client = new CoreClient([
Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_MESSAGES,
Intents.FLAGS.GUILD_MEMBERS,
], devmode);
]);
registry.RegisterCommands();
registry.RegisterEvents();