mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-08 11:37:20 +00:00
Docs updates
This commit is contained in:
parent
f820a06bac
commit
028786d348
13 changed files with 208 additions and 60 deletions
|
@ -4,7 +4,7 @@ import { SavedMessage } from "../data/entities/SavedMessage";
|
|||
import { GuildAutoReactions } from "../data/GuildAutoReactions";
|
||||
import { Message } from "eris";
|
||||
import { customEmojiRegex, errorMessage, isEmoji, successMessage } from "../utils";
|
||||
import { trimPluginDescription, ZeppelinPlugin } from "./ZeppelinPlugin";
|
||||
import { CommandInfo, trimPluginDescription, ZeppelinPlugin } from "./ZeppelinPlugin";
|
||||
import * as t from "io-ts";
|
||||
|
||||
const ConfigSchema = t.type({
|
||||
|
@ -56,7 +56,13 @@ export class AutoReactionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
this.savedMessages.events.off("create", this.onMessageCreateFn);
|
||||
}
|
||||
|
||||
@d.command("auto_reactions", "<channelId:channelId> <reactions...>")
|
||||
@d.command("auto_reactions", "<channelId:channelId> <reactions...>", {
|
||||
extra: {
|
||||
info: <CommandInfo>{
|
||||
basicUsage: "!auto_reactions 629990160477585428 👍 👎",
|
||||
},
|
||||
},
|
||||
})
|
||||
@d.permission("can_manage")
|
||||
async setAutoReactionsCmd(msg: Message, args: { channelId: string; reactions: string[] }) {
|
||||
const finalReactions = [];
|
||||
|
@ -90,7 +96,13 @@ export class AutoReactionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
msg.channel.createMessage(successMessage(`Auto-reactions set for <#${args.channelId}>`));
|
||||
}
|
||||
|
||||
@d.command("auto_reactions disable", "<channelId:channelId>")
|
||||
@d.command("auto_reactions disable", "<channelId:channelId>", {
|
||||
extra: {
|
||||
info: <CommandInfo>{
|
||||
basicUsage: "!auto_reactions disable 629990160477585428",
|
||||
},
|
||||
},
|
||||
})
|
||||
@d.permission("can_manage")
|
||||
async disableAutoReactionsCmd(msg: Message, args: { channelId: string }) {
|
||||
const autoReaction = await this.autoReactions.getForChannel(args.channelId);
|
||||
|
|
|
@ -4,7 +4,7 @@ import { CaseTypes } from "../data/CaseTypes";
|
|||
import { Case } from "../data/entities/Case";
|
||||
import moment from "moment-timezone";
|
||||
import { CaseTypeColors } from "../data/CaseTypeColors";
|
||||
import { trimPluginDescription, ZeppelinPlugin } from "./ZeppelinPlugin";
|
||||
import { PluginInfo, trimPluginDescription, ZeppelinPlugin } from "./ZeppelinPlugin";
|
||||
import { GuildArchives } from "../data/GuildArchives";
|
||||
import { IPluginOptions } from "knub";
|
||||
import { GuildLogs } from "../data/GuildLogs";
|
||||
|
@ -47,7 +47,7 @@ export class CasesPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
public static pluginName = "cases";
|
||||
public static configSchema = ConfigSchema;
|
||||
|
||||
public static pluginInfo = {
|
||||
public static pluginInfo: PluginInfo = {
|
||||
prettyName: "Cases",
|
||||
description: trimPluginDescription(`
|
||||
This plugin contains basic configuration for cases created by other plugins
|
||||
|
|
|
@ -5,7 +5,7 @@ import { Member, MemberOptions } from "eris";
|
|||
import { GuildLogs } from "../data/GuildLogs";
|
||||
import { LogType } from "../data/LogType";
|
||||
import { stripObjectToScalars } from "../utils";
|
||||
import { ZeppelinPlugin } from "./ZeppelinPlugin";
|
||||
import { trimPluginDescription, ZeppelinPlugin } from "./ZeppelinPlugin";
|
||||
import * as t from "io-ts";
|
||||
|
||||
const ConfigSchema = t.type({
|
||||
|
@ -21,6 +21,9 @@ export class PersistPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
|
||||
public static pluginInfo = {
|
||||
prettyName: "Persist",
|
||||
description: trimPluginDescription(`
|
||||
Blah
|
||||
`),
|
||||
};
|
||||
|
||||
protected persistedData: GuildPersistedData;
|
||||
|
|
|
@ -41,6 +41,9 @@ export interface CommandInfo {
|
|||
parameterDescriptions?: {
|
||||
[key: string]: TMarkdown;
|
||||
};
|
||||
optionDescriptions?: {
|
||||
[key: string]: TMarkdown;
|
||||
};
|
||||
}
|
||||
|
||||
export function trimPluginDescription(str) {
|
||||
|
|
|
@ -26,11 +26,13 @@ import { CompanionChannelPlugin } from "./CompanionChannels";
|
|||
import { LocatePlugin } from "./LocateUser";
|
||||
import { GuildConfigReloader } from "./GuildConfigReloader";
|
||||
import { ChannelArchiverPlugin } from "./ChannelArchiver";
|
||||
import { AutomodPlugin } from "./Automod";
|
||||
|
||||
/**
|
||||
* Plugins available to be loaded for individual guilds
|
||||
*/
|
||||
export const availablePlugins = [
|
||||
AutomodPlugin,
|
||||
MessageSaverPlugin,
|
||||
NameHistoryPlugin,
|
||||
CasesPlugin,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue