This commit is contained in:
Isaac 2021-05-12 18:13:58 +01:00
parent a0ec19faee
commit 1a8b86dee0
No known key found for this signature in database
GPG Key ID: F6812DBC6719B4E3
3 changed files with 17 additions and 0 deletions

View File

@ -52,6 +52,7 @@ module.exports = class SettingsCommand extends Command {
cat_row.name_format = c.name_format;
cat_row.opening_message = c.opening_message;
cat_row.opening_questions = c.opening_questions;
cat_row.ping = c.ping;
cat_row.require_topic = c.require_topic;
cat_row.roles = c.roles;
cat_row.survey = c.survey;
@ -111,6 +112,7 @@ module.exports = class SettingsCommand extends Command {
name_format: c.name_format,
opening_message: c.opening_message,
opening_questions: c.opening_questions,
ping: c.ping,
require_topic: c.require_topic,
roles: c.roles,
survey: c.survey
@ -162,6 +164,7 @@ module.exports = class SettingsCommand extends Command {
name_format: c.name_format,
opening_message: c.opening_message,
opening_questions: c.opening_questions,
ping: c.ping,
require_topic: c.require_topic,
roles: c.roles,
survey: c.survey

View File

@ -46,6 +46,10 @@ module.exports = ({ config }, sequelize) => {
type: DataTypes.JSON,
allowNull: true,
},
ping: {
type: DataTypes.JSON,
defaultValue: [],
},
require_topic: {
type: DataTypes.BOOLEAN,
defaultValue: false,

View File

@ -37,6 +37,16 @@ module.exports = class TicketManager extends EventEmitter {
? this.client.cryptr.decrypt(t_row.topic)
: '';
if (cat_row.ping instanceof Array) {
let mentions = cat_row.ping.map(id => id === 'everyone'
? '@everyone'
: id === 'here'
? '@here'
: `<@&${id}>`);
await t_channel.send(mentions.join(', '));
}
await t_channel.send(member.user.toString());
if (cat_row.image) {