mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Formatting and initial ButtonRoles DB work
This commit is contained in:
parent
6ac9d2f2a2
commit
5efdf5ce95
108 changed files with 253 additions and 303 deletions
|
@ -3,7 +3,6 @@ import humanizeDuration from "humanize-duration";
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { slowmodeCmd } from "../types";
|
||||
|
||||
|
||||
export const SlowmodeGetCmd = slowmodeCmd({
|
||||
trigger: "slowmode",
|
||||
permission: "can_manage",
|
||||
|
|
|
@ -4,7 +4,6 @@ import { createChunkedMessage } from "knub/dist/helpers";
|
|||
import { errorMessage } from "../../../utils";
|
||||
import { slowmodeCmd } from "../types";
|
||||
|
||||
|
||||
export const SlowmodeListCmd = slowmodeCmd({
|
||||
trigger: ["slowmode list", "slowmode l", "slowmodes"],
|
||||
permission: "can_manage",
|
||||
|
|
|
@ -10,7 +10,6 @@ import { slowmodeCmd } from "../types";
|
|||
import { actualDisableSlowmodeCmd } from "../util/actualDisableSlowmodeCmd";
|
||||
import { disableBotSlowmodeForChannel } from "../util/disableBotSlowmodeForChannel";
|
||||
|
||||
|
||||
const MAX_NATIVE_SLOWMODE = 6 * HOURS; // 6 hours
|
||||
const MAX_BOT_SLOWMODE = DAYS * 365 * 100; // 100 years
|
||||
const MIN_BOT_SLOWMODE = 15 * MINUTES;
|
||||
|
|
|
@ -5,7 +5,6 @@ import { logger } from "../../../logger";
|
|||
import { isDiscordRESTError, stripObjectToScalars, UnknownUser } from "../../../utils";
|
||||
import { SlowmodePluginType } from "../types";
|
||||
|
||||
|
||||
export async function applyBotSlowmodeToUserId(
|
||||
pluginData: GuildPluginData<SlowmodePluginType>,
|
||||
channel: GuildChannel & TextChannel,
|
||||
|
|
|
@ -6,7 +6,6 @@ import { stripObjectToScalars, UnknownUser } from "../../../utils";
|
|||
import { SlowmodePluginType } from "../types";
|
||||
import { clearBotSlowmodeFromUserId } from "./clearBotSlowmodeFromUserId";
|
||||
|
||||
|
||||
export async function clearExpiredSlowmodes(pluginData: GuildPluginData<SlowmodePluginType>) {
|
||||
const expiredSlowmodeUsers = await pluginData.state.slowmodes.getExpiredSlowmodeUsers();
|
||||
for (const user of expiredSlowmodeUsers) {
|
||||
|
|
|
@ -12,7 +12,6 @@ import { BOT_SLOWMODE_PERMISSIONS } from "../requiredPermissions";
|
|||
import { SlowmodePluginType } from "../types";
|
||||
import { applyBotSlowmodeToUserId } from "./applyBotSlowmodeToUserId";
|
||||
|
||||
|
||||
export async function onMessageCreate(pluginData: GuildPluginData<SlowmodePluginType>, msg: SavedMessage) {
|
||||
if (msg.is_bot) return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue