mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-09-02 00:31:27 +03:00
things
This commit is contained in:
@@ -21,7 +21,7 @@ module.exports = () => {
|
||||
## ## ## ## ## ## ## ## ## ##
|
||||
## #### ###### ## ## ######## ## ######
|
||||
`));
|
||||
console.log(leeks.colours.cyanBright(`DiscordTickets bot v${version} by eartharoid`));
|
||||
console.log(leeks.colours.cyanBright(`Discord Tickets bot v${version} by eartharoid`));
|
||||
console.log(leeks.colours.cyanBright(homepage + '\n'));
|
||||
console.log(leeks.colours.cyanBright(`Please ${link('donate', 'https://ko-fi.com/eartharoid')} if you find this bot useful`));
|
||||
console.log('\n\n');
|
||||
|
@@ -4,21 +4,22 @@ const Command = require('../modules/commands/command');
|
||||
|
||||
module.exports = class NewCommand extends Command {
|
||||
constructor(client) {
|
||||
const i18n = client.i18n.get();
|
||||
super(client, {
|
||||
internal: true,
|
||||
name: 'new',
|
||||
description: 'Create a new support ticket',
|
||||
name: i18n('commands.new.name'),
|
||||
description: i18n('commands.new.description'),
|
||||
options: [
|
||||
// {
|
||||
// name: 'category',
|
||||
// name: i18n('commands.new.options.category.name'),
|
||||
// type: OptionTypes.STRING,
|
||||
// description: 'The category you would like to create a new ticket for',
|
||||
// description: i18n('commands.new.options.topic.description'),
|
||||
// required: true,
|
||||
// },
|
||||
{
|
||||
name: 'topic',
|
||||
name: i18n('commands.new.options.topic.name'),
|
||||
type: OptionTypes.STRING,
|
||||
description: 'The topic of the ticket',
|
||||
description: i18n('commands.new.options.topic.description'),
|
||||
required: false,
|
||||
}
|
||||
]
|
||||
|
@@ -173,6 +173,75 @@ module.exports = async (log) => {
|
||||
tableName: DB_TABLE_PREFIX + 'messages'
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const UserEntity = sequelize.define('UserEntity', {
|
||||
user: {
|
||||
type: DataTypes.CHAR(18),
|
||||
allowNull: false,
|
||||
unique: 'id_ticket'
|
||||
},
|
||||
ticket: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false,
|
||||
unique: 'id_ticket',
|
||||
references: {
|
||||
model: Ticket,
|
||||
key: 'id'
|
||||
},
|
||||
},
|
||||
avatar: DataTypes.STRING,
|
||||
username: DataTypes.STRING,
|
||||
discriminator: DataTypes.STRING,
|
||||
display_name: DataTypes.STRING,
|
||||
colour: DataTypes.INTEGER,
|
||||
bot: DataTypes.BOOLEAN
|
||||
}, {
|
||||
tableName: DB_TABLE_PREFIX + 'user_entities'
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const ChannelEntity = sequelize.define('ChannelEntity', {
|
||||
channel: {
|
||||
type: DataTypes.CHAR(18),
|
||||
allowNull: false,
|
||||
unique: 'id_ticket'
|
||||
},
|
||||
ticket: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false,
|
||||
unique: 'id_ticket',
|
||||
references: {
|
||||
model: Ticket,
|
||||
key: 'id'
|
||||
},
|
||||
},
|
||||
name: DataTypes.STRING,
|
||||
}, {
|
||||
tableName: DB_TABLE_PREFIX + 'channel_entities'
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const RoleEntity = sequelize.define('RoleEntity', {
|
||||
role: {
|
||||
type: DataTypes.CHAR(18),
|
||||
allowNull: false,
|
||||
unique: 'id_ticket'
|
||||
},
|
||||
ticket: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false,
|
||||
unique: 'id_ticket',
|
||||
references: {
|
||||
model: Ticket,
|
||||
key: 'id'
|
||||
},
|
||||
},
|
||||
name: DataTypes.STRING,
|
||||
colour: DataTypes.INTEGER,
|
||||
}, {
|
||||
tableName: DB_TABLE_PREFIX + 'role_entities'
|
||||
});
|
||||
|
||||
sequelize.sync();
|
||||
|
||||
return sequelize;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* DiscordTickets
|
||||
* Discord Tickets
|
||||
* Copyright (C) 2021 Isaac Saunders
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
const node_version = Number(process.versions.node.split('.')[0]);
|
||||
if (node_version < 14)
|
||||
return console.log(`Error: DiscordTickets does not work on Node v${node_version}. Please upgrade to v14 or above.`);
|
||||
return console.log(`Error: Discord Tickets does not work on Node v${node_version}. Please upgrade to v14 or above.`);
|
||||
|
||||
const fs = require('fs');
|
||||
const { path } = require('./utils/fs');
|
||||
@@ -130,7 +130,7 @@ class Bot extends Client {
|
||||
async postStats() {
|
||||
/**
|
||||
* OH NO, TELEMETRY!?
|
||||
* Relax, it just counts how many people are using DiscordTickets.
|
||||
* Relax, it just counts how many people are using Discord Tickets.
|
||||
* You can see the source here: https://github.com/discord-tickets/stats
|
||||
*/
|
||||
if (this.config.super_secret_setting) { // you can disable it if you really want
|
||||
|
@@ -1,11 +1,22 @@
|
||||
{
|
||||
"admin_only": "❌ You must be an administrator to use this command.",
|
||||
"bot": {
|
||||
"version": "DiscordTickets v%s by eartharoid"
|
||||
"version": "Discord Tickets v%s by eartharoid"
|
||||
},
|
||||
"cmd": {
|
||||
"commands": {
|
||||
"new": {
|
||||
|
||||
"name": "new",
|
||||
"description": "Create a new support ticket",
|
||||
"options": {
|
||||
"category": {
|
||||
"name": "category",
|
||||
"description": "The category you would like to create a new ticket for"
|
||||
},
|
||||
"topic": {
|
||||
"name": "topic",
|
||||
"description": "The topic of the ticket"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"no_perm": "❌ You do not have the permissions required to use this command:\n%s",
|
||||
|
@@ -2,7 +2,7 @@ const { path } = require('./utils/fs');
|
||||
const config = require('../user/config');
|
||||
const Logger = require('leekslazylogger-fastify');
|
||||
module.exports = new Logger({
|
||||
name: 'DiscordTickets by eartharoid',
|
||||
name: 'Discord Tickets by eartharoid',
|
||||
debug: config.debug,
|
||||
logToFile: config.logs.enabled,
|
||||
splitFile: true,
|
||||
|
Reference in New Issue
Block a user