mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-21 14:04:38 +02:00
Fix lint
This commit is contained in:
@@ -332,7 +332,7 @@ served over 10,000 servers with a uniquely devoted fanbase.
|
|||||||
* **tag-add**: Adds a tag for this server.
|
* **tag-add**: Adds a tag for this server.
|
||||||
* **tag-edit**: Edits a tag in this server.
|
* **tag-edit**: Edits a tag in this server.
|
||||||
* **tag-info**: Responds with detailed information on a tag in this server.
|
* **tag-info**: Responds with detailed information on a tag in this server.
|
||||||
* **tag-remove**: Removes a tag for this server.
|
* **tag-remove**: Removes a tag from this server.
|
||||||
* **tag-source**: Responds with the base markdown of a tag in this server.
|
* **tag-source**: Responds with the base markdown of a tag in this server.
|
||||||
|
|
||||||
### Role Management:
|
### Role Management:
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ module.exports = class TagEditCommand extends Command {
|
|||||||
|
|
||||||
async run(msg, { id, text }) {
|
async run(msg, { id, text }) {
|
||||||
const tag = await Tag.findOne({ where: { id, guildID: msg.guild.id } });
|
const tag = await Tag.findOne({ where: { id, guildID: msg.guild.id } });
|
||||||
if (!tag) return msg.reply(`A tag with the ID **${id}** doesn\'t exist.`);
|
if (!tag) return msg.reply(`A tag with the ID **${id}** doesn't exist.`);
|
||||||
if (!msg.channel.permissionsFor(msg.author).has('MANAGE_MESSAGES') && tag.userID !== msg.author.id) {
|
if (!msg.channel.permissionsFor(msg.author).has('MANAGE_MESSAGES') && tag.userID !== msg.author.id) {
|
||||||
return msg.reply('You can only edit your own tags.');
|
return msg.reply('You can only edit your own tags.');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ module.exports = class TagInfoCommand extends Command {
|
|||||||
|
|
||||||
async run(msg, { id }) {
|
async run(msg, { id }) {
|
||||||
const tag = await Tag.findOne({ where: { id, guildID: msg.guild.id } });
|
const tag = await Tag.findOne({ where: { id, guildID: msg.guild.id } });
|
||||||
if (!tag) return msg.reply(`A tag with the ID **${id}** doesn\'t exist.`);
|
if (!tag) return msg.reply(`A tag with the ID **${id}** doesn't exist.`);
|
||||||
let author;
|
let author;
|
||||||
try {
|
try {
|
||||||
const authorUser = await this.client.users.fetch(tag.userID);
|
const authorUser = await this.client.users.fetch(tag.userID);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ module.exports = class TagRemoveCommand extends Command {
|
|||||||
aliases: ['tag-delete', 'remove-tag', 'delete-tag'],
|
aliases: ['tag-delete', 'remove-tag', 'delete-tag'],
|
||||||
group: 'tags',
|
group: 'tags',
|
||||||
memberName: 'remove',
|
memberName: 'remove',
|
||||||
description: 'Removes a tag for this server.',
|
description: 'Removes a tag from this server.',
|
||||||
guildOnly: true,
|
guildOnly: true,
|
||||||
args: [
|
args: [
|
||||||
{
|
{
|
||||||
@@ -24,7 +24,7 @@ module.exports = class TagRemoveCommand extends Command {
|
|||||||
|
|
||||||
async run(msg, { id }) {
|
async run(msg, { id }) {
|
||||||
const tag = await Tag.findOne({ where: { id, guildID: msg.guild.id } });
|
const tag = await Tag.findOne({ where: { id, guildID: msg.guild.id } });
|
||||||
if (!tag) return msg.reply(`A tag with the ID **${id}** doesn\'t exist.`);
|
if (!tag) return msg.reply(`A tag with the ID **${id}** doesn't exist.`);
|
||||||
if (!msg.channel.permissionsFor(msg.author).has('MANAGE_MESSAGES') && tag.userID !== msg.author.id) {
|
if (!msg.channel.permissionsFor(msg.author).has('MANAGE_MESSAGES') && tag.userID !== msg.author.id) {
|
||||||
return msg.reply('You can only delete your own tags.');
|
return msg.reply('You can only delete your own tags.');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ module.exports = class TagSourceCommand extends Command {
|
|||||||
|
|
||||||
async run(msg, { id }) {
|
async run(msg, { id }) {
|
||||||
const tag = await Tag.findOne({ where: { id, guildID: msg.guild.id } });
|
const tag = await Tag.findOne({ where: { id, guildID: msg.guild.id } });
|
||||||
if (!tag) return msg.reply(`A tag with the ID **${id}** doesn\'t exist.`);
|
if (!tag) return msg.reply(`A tag with the ID **${id}** doesn't exist.`);
|
||||||
return msg.code('md', tag.text);
|
return msg.code('md', tag.text);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ module.exports = class TagCommand extends Command {
|
|||||||
|
|
||||||
async run(msg, { id }) {
|
async run(msg, { id }) {
|
||||||
const tag = await Tag.findOne({ where: { id, guildID: msg.guild.id } });
|
const tag = await Tag.findOne({ where: { id, guildID: msg.guild.id } });
|
||||||
if (!tag) return msg.reply(`A tag with the ID **${id}** doesn\'t exist.`);
|
if (!tag) return msg.reply(`A tag with the ID **${id}** doesn't exist.`);
|
||||||
return msg.say(tag.text);
|
return msg.say(tag.text);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user