mirror of
https://github.com/Burn-E99/TheArtificer.git
synced 2026-06-04 00:53:50 -04:00
Made [[opt-in available via DM only
This commit is contained in:
@@ -11,29 +11,29 @@ export const optIn = async (message: DiscordenoMessage) => {
|
||||
// Light telemetry to see how many times a command is being run
|
||||
dbClient.execute(queries.callIncCnt('opt-out')).catch((e) => utils.commonLoggers.dbError('optIn.ts:11', 'call sproc INC_CNT on', e));
|
||||
|
||||
try {
|
||||
const idIdx = ignoreList.indexOf(message.authorId);
|
||||
if (idIdx !== -1) {
|
||||
const idIdx = ignoreList.indexOf(message.authorId);
|
||||
if (idIdx !== -1) {
|
||||
try {
|
||||
ignoreList.splice(idIdx, 1);
|
||||
await dbClient.execute('DELETE FROM ignore_list WHERE userid = ?', [message.authorId]);
|
||||
|
||||
message.reply({
|
||||
embeds: [{
|
||||
color: successColor,
|
||||
title: `${config.name} will now respond to you again.`,
|
||||
description: `If you want ${config.name} to ignore to you again, please run the following command:
|
||||
|
||||
\`${config.prefix}opt-out\``,
|
||||
}],
|
||||
}).catch((e: Error) => utils.commonLoggers.messageSendError('optIn.ts:27', message, e));
|
||||
} catch (err) {
|
||||
message.reply({
|
||||
embeds: [{
|
||||
color: failColor,
|
||||
title: 'Opt-In failed',
|
||||
description: 'Please try the command again. If the issue persists, please join the support server, linked in my About Me section.',
|
||||
}],
|
||||
}).catch((e: Error) => utils.commonLoggers.messageSendError('optIn.ts:27', message, e));
|
||||
}
|
||||
|
||||
message.reply({
|
||||
embeds: [{
|
||||
color: successColor,
|
||||
title: `${config.name} will now respond to you again.`,
|
||||
description: `If you want ${config.name} to ignore to you again, please run the following command:
|
||||
|
||||
\`${config.prefix}opt-out\``,
|
||||
}],
|
||||
}).catch((e: Error) => utils.commonLoggers.messageSendError('optIn.ts:27', message, e));
|
||||
} catch (err) {
|
||||
message.reply({
|
||||
embeds: [{
|
||||
color: failColor,
|
||||
title: 'Opt-In failed',
|
||||
description: 'Please try the command again. If the issue persists, please join the support server, linked in my About Me section.',
|
||||
}],
|
||||
}).catch((e: Error) => utils.commonLoggers.messageSendError('optIn.ts:27', message, e));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@ export const optOut = async (message: DiscordenoMessage) => {
|
||||
embeds: [{
|
||||
color: successColor,
|
||||
title: `${config.name} will no longer respond to you.`,
|
||||
description: `If you want ${config.name} to respond to you again, please run the following command:
|
||||
description: `If you want ${config.name} to respond to you again, please DM ${config.name} the following command:
|
||||
|
||||
\`${config.prefix}opt-in\``,
|
||||
}],
|
||||
|
||||
Reference in New Issue
Block a user