Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
},
false,
'Shutdown scheduled',
);
}
}
module.exports = {
commandAliases: ['quiz', 'readingQuiz', 'starttest', 'startquiz', 'rt', 'rq', 'q'],
aliasesForHelp: ['quiz', 'q'],
canBeChannelRestricted: true,
uniqueId: 'readingQuiz14934',
cooldown: 1,
shortDescription: 'See how to start a quiz in this channel.',
longDescription: helpLongDescription,
requiredBotPermissions: [Permissions.attachFiles, Permissions.embedLinks, Permissions.sendMessages],
requiredSettings: quizManager.getDesiredSettings().concat([
'quiz/japanese/conquest_and_inferno_enabled',
'quiz/japanese/internet_decks_enabled',
]),
attachIsServerAdmin: true,
async action(bot, msg, suffix, monochrome, serverSettings) {
let suffixReplaced = suffix.replace(/ *\+ */g, '+').replace(/ *-mc/g, '-mc').trim();
suffixReplaced = suffixReplaced.toLowerCase();
const messageSender = new DiscordMessageSender(bot, msg);
const masteryEnabled = serverSettings['quiz/japanese/conquest_and_inferno_enabled'];
const internetDecksEnabled = serverSettings['quiz/japanese/internet_decks_enabled'];
const isMastery = msg.extension === MASTERY_EXTENSION
|| suffixReplaced.indexOf(MASTERY_NAME) !== -1;
const isConquest = !isMastery
&& (msg.extension === CONQUEST_EXTENSION || suffixReplaced.indexOf(CONQUEST_NAME) !== -1);
throw new FulfillmentError({
publicMessage: messageContent,
logDescription: 'Shutdown scheduled',
});
}
}
module.exports = {
commandAliases: ['quiz', 'readingQuiz', 'starttest', 'startquiz', 'rt', 'rq', 'q'],
aliasesForHelp: ['quiz', 'q'],
canBeChannelRestricted: true,
uniqueId: 'readingQuiz14934',
cooldown: 1,
shortDescription: 'See how to start a quiz in this channel.',
longDescription: helpLongDescription,
requiredBotPermissions: [Permissions.attachFiles, Permissions.embedLinks, Permissions.sendMessages],
requiredSettings: quizManager.getDesiredSettings().concat([
'quiz/japanese/conquest_and_inferno_enabled',
'quiz/japanese/internet_decks_enabled',
]),
attachIsServerAdmin: true,
async action(bot, msg, suffix, monochrome, serverSettings) {
let suffixReplaced = suffix.replace(/ *\+ */g, '+').replace(/ *-mc/g, '-mc').trim();
suffixReplaced = suffixReplaced.toLowerCase();
const messageSender = new DiscordMessageSender(bot, msg);
const masteryEnabled = serverSettings['quiz/japanese/conquest_and_inferno_enabled'];
const internetDecksEnabled = serverSettings['quiz/japanese/internet_decks_enabled'];
const isMastery = msg.extension === MASTERY_EXTENSION
|| suffixReplaced.indexOf(MASTERY_NAME) !== -1;
const isConquest = !isMastery
&& (msg.extension === CONQUEST_EXTENSION || suffixReplaced.indexOf(CONQUEST_NAME) !== -1);