mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-08 19:47:20 +00:00
Added Discord attachment link reaction, fixed emoji configuration and moved util functions
This commit is contained in:
parent
a4c4b17a14
commit
592d037148
173 changed files with 1540 additions and 1170 deletions
|
@ -1,8 +1,8 @@
|
|||
import { Snowflake, TextChannel } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { messageLink } from "../../../utils";
|
||||
import { canReadChannel } from "../../../utils/canReadChannel";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { utilityCmd } from "../types";
|
||||
|
||||
export const ContextCmd = utilityCmd({
|
||||
|
@ -23,7 +23,7 @@ export const ContextCmd = utilityCmd({
|
|||
|
||||
async run({ message: msg, args, pluginData }) {
|
||||
if (args.channel && !(args.channel instanceof TextChannel)) {
|
||||
sendErrorMessage(pluginData, msg.channel, "Channel must be a text channel");
|
||||
pluginData.getPlugin(CommonPlugin).sendErrorMessage(msg, "Channel must be a text channel");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ export const ContextCmd = utilityCmd({
|
|||
const messageId = args.messageId ?? args.message.messageId;
|
||||
|
||||
if (!canReadChannel(channel, msg.member)) {
|
||||
sendErrorMessage(pluginData, msg.channel, "Message context not found");
|
||||
pluginData.getPlugin(CommonPlugin).sendErrorMessage(msg, "Message context not found");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ export const ContextCmd = utilityCmd({
|
|||
})
|
||||
)[0];
|
||||
if (!previousMessage) {
|
||||
sendErrorMessage(pluginData, msg.channel, "Message context not found");
|
||||
pluginData.getPlugin(CommonPlugin).sendErrorMessage(msg, "Message context not found");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue