Add custom logger. Fix a bunch of errors. Optimize imports.
This commit is contained in:
parent
0dae54745d
commit
1064a1ca46
89 changed files with 198 additions and 229 deletions
|
@ -21,12 +21,12 @@ export const ContextCmd = utilityCmd({
|
|||
return;
|
||||
}
|
||||
|
||||
const previousMessage = (await this.bot.getMessages(args.channel.id, 1, args.messageId))[0];
|
||||
const previousMessage = (await pluginData.client.getMessages(args.channel.id, 1, args.messageId))[0];
|
||||
if (!previousMessage) {
|
||||
sendErrorMessage(pluginData, msg.channel, "Message context not found");
|
||||
return;
|
||||
}
|
||||
|
||||
msg.channel.createMessage(messageLink(this.guildId, previousMessage.channel.id, previousMessage.id));
|
||||
msg.channel.createMessage(messageLink(pluginData.guild.id, previousMessage.channel.id, previousMessage.id));
|
||||
},
|
||||
});
|
||||
|
|
|
@ -18,7 +18,7 @@ export const HelpCmd = utilityCmd({
|
|||
const searchStr = args.command.toLowerCase();
|
||||
|
||||
const matchingCommands: Array<{
|
||||
plugin: LoadedPlugin;
|
||||
plugin: LoadedPlugin<any>;
|
||||
command: PluginCommandDefinition;
|
||||
}> = [];
|
||||
|
||||
|
@ -62,12 +62,10 @@ export const HelpCmd = utilityCmd({
|
|||
.toLowerCase()
|
||||
.replace(/\s/g, "-");
|
||||
|
||||
const pluginName = plugin.blueprint?.name || plugin.class?.pluginName;
|
||||
|
||||
let snippet = `**${prefix}${trigger}**`;
|
||||
if (description) snippet += `\n${description}`;
|
||||
if (usage) snippet += `\nBasic usage: \`${usage}\``;
|
||||
snippet += `\n<https://zeppelin.gg/docs/plugins/${pluginName}/usage#command-${commandSlug}>`;
|
||||
snippet += `\n<https://zeppelin.gg/docs/plugins/${plugin.blueprint.name}/usage#command-${commandSlug}>`;
|
||||
|
||||
return snippet;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue