Allow changing default prefix in config

This commit is contained in:
TheEssem 2020-09-03 17:48:28 -05:00
parent e0d7ea7a57
commit 1c686016bb
4 changed files with 6 additions and 3 deletions

View file

@ -12,6 +12,9 @@ MONGO=mongodb://localhost:27017/esmBot
# Put snowflake ID of bot owner here # Put snowflake ID of bot owner here
OWNER= OWNER=
# Put default prefix here
PREFIX=&
########### ###########
# Optional # Optional
########### ###########

View file

@ -9,7 +9,7 @@ module.exports = async (guild) => {
const guildDB = new db.guilds({ const guildDB = new db.guilds({
id: guild.id, id: guild.id,
tags: misc.tagDefaults, tags: misc.tagDefaults,
prefix: "&", prefix: process.env.PREFIX,
warns: {}, warns: {},
disabledChannels: [], disabledChannels: [],
tagsDisabled: false tagsDisabled: false

View file

@ -24,7 +24,7 @@ module.exports = async () => {
const newGuild = new database.guilds({ const newGuild = new database.guilds({
id: id, id: id,
tags: misc.tagDefaults, tags: misc.tagDefaults,
prefix: "&", prefix: process.env.PREFIX,
warns: {}, warns: {},
disabledChannels: [], disabledChannels: [],
tagsDisabled: false tagsDisabled: false

View file

@ -85,7 +85,7 @@ exports.decodeEntities = (string) => {
// define defaults for prefixes and tags // define defaults for prefixes and tags
exports.defaults = { exports.defaults = {
prefix: "&" prefix: process.env.PREFIX
}; };
exports.tagDefaults = { exports.tagDefaults = {
help: { help: {