mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-06-08 00:05:01 +00:00
Ran prettier to fix style issues
This commit is contained in:
parent
893a77d562
commit
1f0c7a4349
170 changed files with 396 additions and 453 deletions
|
@ -2,6 +2,7 @@ import { PluginOptions, guildPlugin } from "knub";
|
|||
import { Queue } from "../../Queue";
|
||||
import { GuildReactionRoles } from "../../data/GuildReactionRoles";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin";
|
||||
import { ClearReactionRolesCmd } from "./commands/ClearReactionRolesCmd";
|
||||
import { InitReactionRolesCmd } from "./commands/InitReactionRolesCmd";
|
||||
|
@ -9,7 +10,6 @@ import { RefreshReactionRolesCmd } from "./commands/RefreshReactionRolesCmd";
|
|||
import { AddReactionRoleEvt } from "./events/AddReactionRoleEvt";
|
||||
import { MessageDeletedEvt } from "./events/MessageDeletedEvt";
|
||||
import { ReactionRolesPluginType, zReactionRolesConfig } from "./types";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin";
|
||||
|
||||
const MIN_AUTO_REFRESH = 1000 * 60 * 15; // 15min minimum, let's not abuse the API
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { Message } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { isDiscordAPIError } from "../../../utils";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { reactionRolesCmd } from "../types";
|
||||
|
||||
export const ClearReactionRolesCmd = reactionRolesCmd({
|
||||
|
|
|
@ -2,7 +2,6 @@ import { Snowflake } from "discord.js";
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { canUseEmoji, isDiscordAPIError, isValidEmoji, noop, trimPluginDescription } from "../../../utils";
|
||||
import { canReadChannel } from "../../../utils/canReadChannel";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { TReactionRolePair, reactionRolesCmd } from "../types";
|
||||
import { applyReactionRoleReactionsToMessage } from "../util/applyReactionRoleReactionsToMessage";
|
||||
|
||||
|
@ -34,7 +33,10 @@ export const InitReactionRolesCmd = reactionRolesCmd({
|
|||
|
||||
async run({ message: msg, args, pluginData }) {
|
||||
if (!canReadChannel(args.message.channel, msg.member)) {
|
||||
void pluginData.state.common.sendErrorMessage(msg, "You can't add reaction roles to channels you can't see yourself");
|
||||
void pluginData.state.common.sendErrorMessage(
|
||||
msg,
|
||||
"You can't add reaction roles to channels you can't see yourself",
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -71,7 +73,10 @@ export const InitReactionRolesCmd = reactionRolesCmd({
|
|||
// Verify the specified emojis and roles are valid and usable
|
||||
for (const pair of emojiRolePairs) {
|
||||
if (pair[0] === CLEAR_ROLES_EMOJI) {
|
||||
void pluginData.state.common.sendErrorMessage(msg, `The emoji for clearing roles (${CLEAR_ROLES_EMOJI}) is reserved and cannot be used`);
|
||||
void pluginData.state.common.sendErrorMessage(
|
||||
msg,
|
||||
`The emoji for clearing roles (${CLEAR_ROLES_EMOJI}) is reserved and cannot be used`,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -81,7 +86,10 @@ export const InitReactionRolesCmd = reactionRolesCmd({
|
|||
}
|
||||
|
||||
if (!canUseEmoji(pluginData.client, pair[0])) {
|
||||
void pluginData.state.common.sendErrorMessage(msg, "I can only use regular emojis and custom emojis from servers I'm on");
|
||||
void pluginData.state.common.sendErrorMessage(
|
||||
msg,
|
||||
"I can only use regular emojis and custom emojis from servers I'm on",
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { reactionRolesCmd } from "../types";
|
||||
import { refreshReactionRoles } from "../util/refreshReactionRoles";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue