merge bs
This commit is contained in:
parent
33c6f57150
commit
be50aacb3a
@ -59,6 +59,16 @@ switch("{set}") {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TAGS]
|
||||||
|
**Usable tags:**
|
||||||
|
{mention} - mentions the user
|
||||||
|
{tag} - username#discriminator
|
||||||
|
{user} - username
|
||||||
|
{guildsize} - member count of the server
|
||||||
|
{guildname} - name of the server
|
||||||
|
{accage} - age of the account
|
||||||
|
{id} - ID of the account
|
||||||
|
|
||||||
//Errors
|
//Errors
|
||||||
|
|
||||||
[ERR_CHANNEL_RESOLVE]
|
[ERR_CHANNEL_RESOLVE]
|
||||||
|
@ -36,11 +36,11 @@ class ModerationLogsSetting extends Setting {
|
|||||||
|
|
||||||
async handle(message, params) {
|
async handle(message, params) {
|
||||||
|
|
||||||
const setting = message.guild._settings.moderationLog;
|
const { guild } = message;
|
||||||
|
const setting = guild._settings.moderationLog;
|
||||||
const response = await this.resolveMethod(params, CONSTANTS.INFRACTIONS, setting.infractions);
|
const response = await this.resolveMethod(params, CONSTANTS.INFRACTIONS, setting.infractions);
|
||||||
|
|
||||||
if (response) {
|
if (response) {
|
||||||
console.log(response);
|
|
||||||
|
|
||||||
if (params.length < 2 && response.method !== 'list') return {
|
if (params.length < 2 && response.method !== 'list') return {
|
||||||
msg: message.format('MISSING_ARGS'),
|
msg: message.format('MISSING_ARGS'),
|
||||||
@ -77,7 +77,7 @@ class ModerationLogsSetting extends Setting {
|
|||||||
|
|
||||||
let [channel] = params;
|
let [channel] = params;
|
||||||
|
|
||||||
channel = await message.guild.resolveChannel(channel);
|
channel = await guild.resolveChannel(channel);
|
||||||
if (!channel) return {
|
if (!channel) return {
|
||||||
msg: message.format('S_MODERATIONLOG_CHANNEL404', { val: params[0] }),
|
msg: message.format('S_MODERATIONLOG_CHANNEL404', { val: params[0] }),
|
||||||
error: true
|
error: true
|
||||||
@ -98,7 +98,7 @@ class ModerationLogsSetting extends Setting {
|
|||||||
};
|
};
|
||||||
|
|
||||||
setting.channel = channel.id;
|
setting.channel = channel.id;
|
||||||
await message.guild._updateSettings({ [this.index]: setting }); return {
|
await guild._updateSettings({ [this.index]: setting }); return {
|
||||||
msg: message.format('S_MODERATIONLOG_CHANNEL_SUCCESS', { channel: channel.name }),
|
msg: message.format('S_MODERATIONLOG_CHANNEL_SUCCESS', { channel: channel.name }),
|
||||||
error: false
|
error: false
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user