mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-08 03:27:20 +00:00
Merge branch 'master' of github.com:ZeppelinBot/Zeppelin into feat/application-commands
This commit is contained in:
commit
0be54912c4
164 changed files with 22402 additions and 25686 deletions
|
@ -1,21 +1,21 @@
|
|||
import { GuildMember, Snowflake } from "discord.js";
|
||||
import { PluginOptions } from "knub";
|
||||
import { Snowflake } from "discord.js";
|
||||
import { PluginOptions, guildPlugin } from "knub";
|
||||
import { GuildArchives } from "../../data/GuildArchives";
|
||||
import { GuildCases } from "../../data/GuildCases";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { Supporters } from "../../data/Supporters";
|
||||
import { makePublicFn } from "../../pluginUtils";
|
||||
import { discardRegExpRunner, getRegExpRunner } from "../../regExpRunners";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin";
|
||||
import { ModActionsPlugin } from "../ModActions/ModActionsPlugin";
|
||||
import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin";
|
||||
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
|
||||
import { AboutCmd } from "./commands/AboutCmd";
|
||||
import { AvatarCmd } from "./commands/AvatarCmd";
|
||||
import { BanSearchCmd } from "./commands/BanSearchCmd";
|
||||
import { ChannelInfoCmd } from "./commands/ChannelInfoCmd";
|
||||
import { CleanArgs, CleanCmd, cleanCmd } from "./commands/CleanCmd";
|
||||
import { CleanCmd, cleanCmd } from "./commands/CleanCmd";
|
||||
import { ContextCmd } from "./commands/ContextCmd";
|
||||
import { EmojiInfoCmd } from "./commands/EmojiInfoCmd";
|
||||
import { HelpCmd } from "./commands/HelpCmd";
|
||||
|
@ -112,13 +112,8 @@ const defaultOptions: PluginOptions<UtilityPluginType> = {
|
|||
],
|
||||
};
|
||||
|
||||
export const UtilityPlugin = zeppelinGuildPlugin<UtilityPluginType>()({
|
||||
export const UtilityPlugin = guildPlugin<UtilityPluginType>()({
|
||||
name: "utility",
|
||||
showInDocs: true,
|
||||
info: {
|
||||
prettyName: "Utility",
|
||||
configSchema: zUtilityConfig,
|
||||
},
|
||||
|
||||
dependencies: () => [TimeAndDatePlugin, ModActionsPlugin, LogsPlugin],
|
||||
configParser: (input) => zUtilityConfig.parse(input),
|
||||
|
@ -161,24 +156,12 @@ export const UtilityPlugin = zeppelinGuildPlugin<UtilityPluginType>()({
|
|||
AutoJoinThreadSyncEvt,
|
||||
],
|
||||
|
||||
public: {
|
||||
clean(pluginData) {
|
||||
return (args: CleanArgs, msg) => {
|
||||
cleanCmd(pluginData, args, msg);
|
||||
};
|
||||
},
|
||||
|
||||
userInfo(pluginData) {
|
||||
return (userId: Snowflake) => {
|
||||
return getUserInfoEmbed(pluginData, userId, false);
|
||||
};
|
||||
},
|
||||
|
||||
hasPermission(pluginData) {
|
||||
return (member: GuildMember, channelId: Snowflake, permission: string) => {
|
||||
return hasPermission(pluginData, member, channelId, permission);
|
||||
};
|
||||
},
|
||||
public(pluginData) {
|
||||
return {
|
||||
clean: makePublicFn(pluginData, cleanCmd),
|
||||
userInfo: (userId: Snowflake) => getUserInfoEmbed(pluginData, userId, false),
|
||||
hasPermission: makePublicFn(pluginData, hasPermission),
|
||||
};
|
||||
},
|
||||
|
||||
beforeLoad(pluginData) {
|
||||
|
|
8
backend/src/plugins/Utility/info.ts
Normal file
8
backend/src/plugins/Utility/info.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { ZeppelinPluginInfo } from "../../types";
|
||||
import { zUtilityConfig } from "./types";
|
||||
|
||||
export const utilityPluginInfo: ZeppelinPluginInfo = {
|
||||
showInDocs: true,
|
||||
prettyName: "Utility",
|
||||
configSchema: zUtilityConfig,
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue