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
|
@ -8,7 +8,6 @@ import { EmbedWith, multiSorter, resolveMember, sorter } from "../../../utils";
|
|||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
|
||||
export const AboutCmd = utilityCmd({
|
||||
trigger: "about",
|
||||
description: "Show information about Zeppelin's status on the server",
|
||||
|
|
|
@ -10,7 +10,6 @@ import { allowTimeout } from "../../../RegExpRunner";
|
|||
import { DAYS, getInviteCodesInString, noop, SECONDS, stripObjectToScalars } from "../../../utils";
|
||||
import { utilityCmd, UtilityPluginType } from "../types";
|
||||
|
||||
|
||||
const MAX_CLEAN_COUNT = 150;
|
||||
const MAX_CLEAN_TIME = 1 * DAYS;
|
||||
const CLEAN_COMMAND_DELETE_DELAY = 5 * SECONDS;
|
||||
|
|
|
@ -5,7 +5,6 @@ import { messageLink } from "../../../utils";
|
|||
import { canReadChannel } from "../../../utils/canReadChannel";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
|
||||
export const ContextCmd = utilityCmd({
|
||||
trigger: "context",
|
||||
description: "Get a link to the context of the specified message",
|
||||
|
|
|
@ -2,7 +2,6 @@ import { TextChannel } from "discord.js";
|
|||
import { activeReloads } from "../guildReloads";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
|
||||
export const ReloadGuildCmd = utilityCmd({
|
||||
trigger: "reload_guild",
|
||||
description: "Reload the Zeppelin configuration and all plugins for the server. This can sometimes fix issues.",
|
||||
|
|
|
@ -5,7 +5,6 @@ import { chunkArray, sorter, trimLines } from "../../../utils";
|
|||
import { refreshMembersIfNeeded } from "../refreshMembers";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
|
||||
export const RolesCmd = utilityCmd({
|
||||
trigger: "roles",
|
||||
description: "List all roles or roles matching a search",
|
||||
|
|
|
@ -4,7 +4,6 @@ import { getBaseUrl, sendErrorMessage } from "../../../pluginUtils";
|
|||
import { canReadChannel } from "../../../utils/canReadChannel";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
|
||||
export const SourceCmd = utilityCmd({
|
||||
trigger: "source",
|
||||
description: "View the message source of the specified message id",
|
||||
|
|
|
@ -2,12 +2,9 @@ import { VoiceChannel } from "discord.js";
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import {
|
||||
stripObjectToScalars
|
||||
} from "../../../utils";
|
||||
import { stripObjectToScalars } from "../../../utils";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
|
||||
export const VcdisconnectCmd = utilityCmd({
|
||||
trigger: ["vcdisconnect", "vcdisc", "vcdc", "vckick", "vck"],
|
||||
description: "Disconnect a member from their voice channel",
|
||||
|
|
|
@ -2,17 +2,9 @@ import { VoiceChannel } from "discord.js";
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import {
|
||||
channelMentionRegex,
|
||||
|
||||
isSnowflake,
|
||||
|
||||
simpleClosestStringMatch,
|
||||
stripObjectToScalars
|
||||
} from "../../../utils";
|
||||
import { channelMentionRegex, isSnowflake, simpleClosestStringMatch, stripObjectToScalars } from "../../../utils";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
|
||||
export const VcmoveCmd = utilityCmd({
|
||||
trigger: "vcmove",
|
||||
description: "Move a member to another voice channel",
|
||||
|
|
|
@ -7,7 +7,6 @@ import { EmbedWith, formatNumber, preEmbedPadding, trimLines } from "../../../ut
|
|||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
||||
import { UtilityPluginType } from "../types";
|
||||
|
||||
|
||||
const TEXT_CHANNEL_ICON =
|
||||
"https://cdn.discordapp.com/attachments/740650744830623756/740656843545772062/text-channel.png";
|
||||
const VOICE_CHANNEL_ICON =
|
||||
|
|
|
@ -4,21 +4,19 @@ import { GuildPluginData } from "knub";
|
|||
import moment from "moment-timezone";
|
||||
import { ChannelTypeStrings } from "src/types";
|
||||
import {
|
||||
EmbedWith,
|
||||
|
||||
formatNumber,
|
||||
GroupDMInvite,
|
||||
inviteHasCounts,
|
||||
isGroupDMInvite,
|
||||
isGuildInvite,
|
||||
preEmbedPadding,
|
||||
resolveInvite,
|
||||
trimLines
|
||||
EmbedWith,
|
||||
formatNumber,
|
||||
GroupDMInvite,
|
||||
inviteHasCounts,
|
||||
isGroupDMInvite,
|
||||
isGuildInvite,
|
||||
preEmbedPadding,
|
||||
resolveInvite,
|
||||
trimLines,
|
||||
} from "../../../utils";
|
||||
import { snowflakeToTimestamp } from "../../../utils/snowflakeToTimestamp";
|
||||
import { UtilityPluginType } from "../types";
|
||||
|
||||
|
||||
export async function getInviteInfoEmbed(
|
||||
pluginData: GuildPluginData<UtilityPluginType>,
|
||||
inviteCode: string,
|
||||
|
|
|
@ -8,7 +8,6 @@ import { chunkMessageLines, EmbedWith, messageLink, preEmbedPadding, trimEmptyLi
|
|||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
||||
import { UtilityPluginType } from "../types";
|
||||
|
||||
|
||||
const MESSAGE_ICON = "https://cdn.discordapp.com/attachments/740650744830623756/740685652152025088/message.png";
|
||||
|
||||
export async function getMessageInfoEmbed(
|
||||
|
|
|
@ -3,21 +3,20 @@ import humanizeDuration from "humanize-duration";
|
|||
import { GuildPluginData } from "knub";
|
||||
import moment from "moment-timezone";
|
||||
import {
|
||||
EmbedWith,
|
||||
formatNumber,
|
||||
inviteHasCounts,
|
||||
memoize,
|
||||
MINUTES,
|
||||
preEmbedPadding,
|
||||
resolveInvite,
|
||||
resolveUser,
|
||||
trimLines
|
||||
EmbedWith,
|
||||
formatNumber,
|
||||
inviteHasCounts,
|
||||
memoize,
|
||||
MINUTES,
|
||||
preEmbedPadding,
|
||||
resolveInvite,
|
||||
resolveUser,
|
||||
trimLines,
|
||||
} from "../../../utils";
|
||||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
||||
import { UtilityPluginType } from "../types";
|
||||
import { getGuildPreview } from "./getGuildPreview";
|
||||
|
||||
|
||||
export async function getServerInfoEmbed(
|
||||
pluginData: GuildPluginData<UtilityPluginType>,
|
||||
serverId: string,
|
||||
|
|
|
@ -2,9 +2,7 @@ import { MessageEmbedOptions } from "discord.js";
|
|||
import humanizeDuration from "humanize-duration";
|
||||
import { GuildPluginData } from "knub";
|
||||
import moment from "moment-timezone";
|
||||
import {
|
||||
EmbedWith, preEmbedPadding
|
||||
} from "../../../utils";
|
||||
import { EmbedWith, preEmbedPadding } from "../../../utils";
|
||||
import { snowflakeToTimestamp } from "../../../utils/snowflakeToTimestamp";
|
||||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
||||
import { UtilityPluginType } from "../types";
|
||||
|
|
|
@ -4,10 +4,14 @@ import { GuildPluginData } from "knub";
|
|||
import moment from "moment-timezone";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import {
|
||||
EmbedWith, messageLink, preEmbedPadding, resolveMember,
|
||||
resolveUser,
|
||||
|
||||
sorter, trimLines, UnknownUser
|
||||
EmbedWith,
|
||||
messageLink,
|
||||
preEmbedPadding,
|
||||
resolveMember,
|
||||
resolveUser,
|
||||
sorter,
|
||||
trimLines,
|
||||
UnknownUser,
|
||||
} from "../../../utils";
|
||||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
||||
import { UtilityPluginType } from "../types";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue