mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +02:00
Localisation changes
Locale is global not per guild
This commit is contained in:
parent
b904a4ad3d
commit
57ca04288b
@ -4,18 +4,18 @@ const Command = require('../modules/commands/command');
|
||||
|
||||
module.exports = class NewCommand extends Command {
|
||||
constructor(client) {
|
||||
const i18n = client.i18n.get();
|
||||
const i18n = client.i18n.get(client.config.locale);
|
||||
super(client, {
|
||||
internal: true,
|
||||
name: i18n('commands.new.name'),
|
||||
description: i18n('commands.new.description'),
|
||||
options: [
|
||||
// {
|
||||
// name: i18n('commands.new.options.category.name'),
|
||||
// type: OptionTypes.STRING,
|
||||
// description: i18n('commands.new.options.topic.description'),
|
||||
// required: true,
|
||||
// },
|
||||
{
|
||||
name: i18n('commands.new.options.category.name'),
|
||||
type: OptionTypes.STRING,
|
||||
description: i18n('commands.new.options.topic.description'),
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: i18n('commands.new.options.topic.name'),
|
||||
type: OptionTypes.STRING,
|
||||
|
@ -57,7 +57,7 @@ module.exports = async (log) => {
|
||||
await sequelize.authenticate();
|
||||
log.success('Connected to database successfully');
|
||||
} catch (error) {
|
||||
log.warn('Unable to connect to database');
|
||||
log.warn('Failed to connect to database');
|
||||
log.error(error);
|
||||
return process.exit();
|
||||
}
|
||||
@ -72,10 +72,6 @@ module.exports = async (log) => {
|
||||
type: DataTypes.STRING,
|
||||
defaultValue: config.defaults.colour
|
||||
},
|
||||
locale: {
|
||||
type: DataTypes.STRING,
|
||||
defaultValue: config.defaults.locale
|
||||
},
|
||||
log_messages: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
defaultValue: config.defaults.log_messages
|
||||
|
@ -26,11 +26,11 @@ module.exports = {
|
||||
debug: false,
|
||||
defaults: {
|
||||
colour: '#009999',
|
||||
locale: 'en-GB', // can **not** be set for each server
|
||||
log_messages: true, // transcripts/archives will be empty if false
|
||||
prefix: '-',
|
||||
ticket_welcome: 'Hello {{name}}, thank you for creating a ticket. A member of staff will soon be available to assist you.\n\n__All messages in this channel are stored for future reference.__',
|
||||
},
|
||||
locale: 'en-GB',
|
||||
logs: {
|
||||
enabled: true,
|
||||
keep_for: 30
|
||||
|
Loading…
Reference in New Issue
Block a user