mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 08:13: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 {
|
module.exports = class NewCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
const i18n = client.i18n.get();
|
const i18n = client.i18n.get(client.config.locale);
|
||||||
super(client, {
|
super(client, {
|
||||||
internal: true,
|
internal: true,
|
||||||
name: i18n('commands.new.name'),
|
name: i18n('commands.new.name'),
|
||||||
description: i18n('commands.new.description'),
|
description: i18n('commands.new.description'),
|
||||||
options: [
|
options: [
|
||||||
// {
|
{
|
||||||
// name: i18n('commands.new.options.category.name'),
|
name: i18n('commands.new.options.category.name'),
|
||||||
// type: OptionTypes.STRING,
|
type: OptionTypes.STRING,
|
||||||
// description: i18n('commands.new.options.topic.description'),
|
description: i18n('commands.new.options.topic.description'),
|
||||||
// required: true,
|
required: true,
|
||||||
// },
|
},
|
||||||
{
|
{
|
||||||
name: i18n('commands.new.options.topic.name'),
|
name: i18n('commands.new.options.topic.name'),
|
||||||
type: OptionTypes.STRING,
|
type: OptionTypes.STRING,
|
||||||
|
@ -57,7 +57,7 @@ module.exports = async (log) => {
|
|||||||
await sequelize.authenticate();
|
await sequelize.authenticate();
|
||||||
log.success('Connected to database successfully');
|
log.success('Connected to database successfully');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
log.warn('Unable to connect to database');
|
log.warn('Failed to connect to database');
|
||||||
log.error(error);
|
log.error(error);
|
||||||
return process.exit();
|
return process.exit();
|
||||||
}
|
}
|
||||||
@ -72,10 +72,6 @@ module.exports = async (log) => {
|
|||||||
type: DataTypes.STRING,
|
type: DataTypes.STRING,
|
||||||
defaultValue: config.defaults.colour
|
defaultValue: config.defaults.colour
|
||||||
},
|
},
|
||||||
locale: {
|
|
||||||
type: DataTypes.STRING,
|
|
||||||
defaultValue: config.defaults.locale
|
|
||||||
},
|
|
||||||
log_messages: {
|
log_messages: {
|
||||||
type: DataTypes.BOOLEAN,
|
type: DataTypes.BOOLEAN,
|
||||||
defaultValue: config.defaults.log_messages
|
defaultValue: config.defaults.log_messages
|
||||||
|
@ -26,11 +26,11 @@ module.exports = {
|
|||||||
debug: false,
|
debug: false,
|
||||||
defaults: {
|
defaults: {
|
||||||
colour: '#009999',
|
colour: '#009999',
|
||||||
locale: 'en-GB', // can **not** be set for each server
|
|
||||||
log_messages: true, // transcripts/archives will be empty if false
|
log_messages: true, // transcripts/archives will be empty if false
|
||||||
prefix: '-',
|
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.__',
|
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: {
|
logs: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
keep_for: 30
|
keep_for: 30
|
||||||
|
Loading…
Reference in New Issue
Block a user