mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-09-09 11:21:26 +03:00
Fix settings
This commit is contained in:
@@ -34,7 +34,7 @@ module.exports = class AddCommand extends Command {
|
||||
* @returns {Promise<void|any>}
|
||||
*/
|
||||
async execute(message, args) {
|
||||
const settings = await message.guild.settings;
|
||||
const settings = await message.guild.getSettings();
|
||||
const i18n = this.client.i18n.getLocale(settings.locale);
|
||||
|
||||
const ticket = message.mentions.channels.first() ?? message.channel;
|
||||
|
@@ -31,7 +31,7 @@ module.exports = class BlacklistCommand extends Command {
|
||||
* @returns {Promise<void|any>}
|
||||
*/
|
||||
async execute(message, args) {
|
||||
const settings = await message.guild.settings;
|
||||
const settings = await message.guild.getSettings();
|
||||
const i18n = this.client.i18n.getLocale(settings.locale);
|
||||
|
||||
const member = message.mentions.members.first();
|
||||
|
@@ -59,7 +59,7 @@ module.exports = class CloseCommand extends Command {
|
||||
const arg_reason = this.args[1].name;
|
||||
const arg_time = this.args[2].name;
|
||||
|
||||
const settings = await message.guild.settings;
|
||||
const settings = await message.guild.getSettings();
|
||||
const i18n = this.client.i18n.getLocale(settings.locale);
|
||||
|
||||
if (args[arg_time]) {
|
||||
|
@@ -31,7 +31,7 @@ module.exports = class HelpCommand extends Command {
|
||||
* @returns {Promise<void|any>}
|
||||
*/
|
||||
async execute(message, args) {
|
||||
const settings = await message.guild.settings;
|
||||
const settings = await message.guild.getSettings();
|
||||
const i18n = this.client.i18n.getLocale(settings.locale);
|
||||
|
||||
const cmd = this.manager.commands.find(command => command.aliases.includes(args.toLowerCase()));
|
||||
|
@@ -35,7 +35,7 @@ module.exports = class NewCommand extends Command {
|
||||
* @returns {Promise<void|any>}
|
||||
*/
|
||||
async execute(message, args) {
|
||||
const settings = await message.guild.settings;
|
||||
const settings = await message.guild.getSettings();
|
||||
const i18n = this.client.i18n.getLocale(settings.locale);
|
||||
|
||||
const editOrSend = async (msg, content) => {
|
||||
|
@@ -69,7 +69,7 @@ module.exports = class PanelCommand extends Command {
|
||||
const arg_emoji = this.args[2].name;
|
||||
const arg_categories = this.args[3].name;
|
||||
|
||||
const settings = await message.guild.settings;
|
||||
const settings = await message.guild.getSettings();
|
||||
const i18n = this.client.i18n.getLocale(settings.locale);
|
||||
|
||||
if (!args[arg_emoji])
|
||||
|
@@ -34,7 +34,7 @@ module.exports = class RemoveCommand extends Command {
|
||||
* @returns {Promise<void|any>}
|
||||
*/
|
||||
async execute(message, args) {
|
||||
const settings = await message.guild.settings;
|
||||
const settings = await message.guild.getSettings();
|
||||
const i18n = this.client.i18n.getLocale(settings.locale);
|
||||
|
||||
const ticket = message.mentions.channels.first() ?? message.channel;
|
||||
|
@@ -29,7 +29,7 @@ module.exports = class SettingsCommand extends Command {
|
||||
* @returns {Promise<void|any>}
|
||||
*/
|
||||
async execute(message) {
|
||||
const settings = await message.guild.settings;
|
||||
const settings = await message.guild.getSettings();
|
||||
const i18n = this.client.i18n.getLocale(settings.locale);
|
||||
|
||||
const attachments = [...message.attachments.values()];
|
||||
|
@@ -27,7 +27,7 @@ module.exports = class StatsCommand extends Command {
|
||||
* @returns {Promise<void|any>}
|
||||
*/
|
||||
async execute(message) {
|
||||
const settings = await message.guild.settings;
|
||||
const settings = await message.guild.getSettings();
|
||||
const i18n = this.client.i18n.getLocale(settings.locale);
|
||||
|
||||
const messages = await this.client.db.models.Message.findAndCountAll();
|
||||
|
@@ -34,7 +34,7 @@ module.exports = class SurveyCommand extends Command {
|
||||
* @returns {Promise<void|any>}
|
||||
*/
|
||||
async execute(message, args) {
|
||||
const settings = await message.guild.settings;
|
||||
const settings = await message.guild.getSettings();
|
||||
const i18n = this.client.i18n.getLocale(settings.locale);
|
||||
|
||||
const survey = await this.client.db.models.Survey.findOne({
|
||||
|
@@ -35,7 +35,7 @@ module.exports = class TagCommand extends Command {
|
||||
* @returns {Promise<void|any>}
|
||||
*/
|
||||
async execute(message, args) {
|
||||
const settings = await message.guild.settings;
|
||||
const settings = await message.guild.getSettings();
|
||||
const i18n = this.client.i18n.getLocale(settings.locale);
|
||||
|
||||
const t_row = await this.client.db.models.Ticket.findOne({
|
||||
|
@@ -28,7 +28,7 @@ module.exports = class TopicCommand extends Command {
|
||||
* @returns {Promise<void|any>}
|
||||
*/
|
||||
async execute(message, args) {
|
||||
const settings = await message.guild.settings;
|
||||
const settings = await message.guild.getSettings();
|
||||
const i18n = this.client.i18n.getLocale(settings.locale);
|
||||
|
||||
const t_row = await this.client.db.models.Ticket.findOne({
|
||||
|
Reference in New Issue
Block a user