mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
chore: fix lint errors; tweak lint rules
This commit is contained in:
parent
9b3d6f5d68
commit
5f194bf1ef
115 changed files with 176 additions and 264 deletions
|
@ -11,7 +11,7 @@ export const AddToCounterAction = automodAction({
|
|||
|
||||
defaultConfig: {},
|
||||
|
||||
async apply({ pluginData, contexts, actionConfig, matchResult, ruleName }) {
|
||||
async apply({ pluginData, contexts, actionConfig, ruleName }) {
|
||||
const countersPlugin = pluginData.getPlugin(CountersPlugin);
|
||||
if (!countersPlugin.counterExists(actionConfig.counter)) {
|
||||
pluginData.getPlugin(LogsPlugin).logBotAlert({
|
||||
|
|
|
@ -20,7 +20,7 @@ export const ChangeNicknameAction = automodAction({
|
|||
if (pluginData.state.recentNicknameChanges.has(member.id)) continue;
|
||||
const newName = typeof actionConfig === "string" ? actionConfig : actionConfig.name;
|
||||
|
||||
member.edit({ nick: newName }).catch((err) => {
|
||||
member.edit({ nick: newName }).catch(() => {
|
||||
pluginData.getPlugin(LogsPlugin).logBotAlert({
|
||||
body: `Failed to change the nickname of \`${member.id}\``,
|
||||
});
|
||||
|
|
|
@ -70,7 +70,7 @@ export const ChangePermsAction = automodAction({
|
|||
}),
|
||||
defaultConfig: {},
|
||||
|
||||
async apply({ pluginData, contexts, actionConfig, ruleName }) {
|
||||
async apply({ pluginData, contexts, actionConfig }) {
|
||||
const user = contexts.find((c) => c.user)?.user;
|
||||
const message = contexts.find((c) => c.message)?.message;
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ export const ExampleAction = automodAction({
|
|||
|
||||
defaultConfig: {},
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
async apply({ pluginData, contexts, actionConfig }) {
|
||||
// TODO: Everything
|
||||
},
|
||||
|
|
|
@ -7,7 +7,7 @@ export const SetAntiraidLevelAction = automodAction({
|
|||
configType: tNullable(t.string),
|
||||
defaultConfig: "",
|
||||
|
||||
async apply({ pluginData, contexts, actionConfig }) {
|
||||
async apply({ pluginData, actionConfig }) {
|
||||
setAntiraidLevel(pluginData, actionConfig ?? null);
|
||||
},
|
||||
});
|
||||
|
|
|
@ -11,7 +11,7 @@ export const SetCounterAction = automodAction({
|
|||
|
||||
defaultConfig: {},
|
||||
|
||||
async apply({ pluginData, contexts, actionConfig, matchResult, ruleName }) {
|
||||
async apply({ pluginData, contexts, actionConfig, ruleName }) {
|
||||
const countersPlugin = pluginData.getPlugin(CountersPlugin);
|
||||
if (!countersPlugin.counterExists(actionConfig.counter)) {
|
||||
pluginData.getPlugin(LogsPlugin).logBotAlert({
|
||||
|
|
|
@ -31,7 +31,7 @@ export const StartThreadAction = automodAction({
|
|||
limit_per_channel: 5,
|
||||
},
|
||||
|
||||
async apply({ pluginData, contexts, actionConfig, ruleName }) {
|
||||
async apply({ pluginData, contexts, actionConfig }) {
|
||||
// check if the message still exists, we don't want to create threads for deleted messages
|
||||
const threads = contexts.filter((c) => {
|
||||
if (!c.message || !c.user) return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue