mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-14 13:55:03 +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,7 +1,8 @@
|
|||
import { ApiPermissions } from "@shared/apiPermissions";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { isStaffPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { isStaffPreFilter } from "../../../pluginUtils";
|
||||
import { renderUserUsername } from "../../../utils";
|
||||
import { CommonPlugin } from "../../Common/CommonPlugin";
|
||||
import { botControlCmd } from "../types";
|
||||
|
||||
export const AddDashboardUserCmd = botControlCmd({
|
||||
|
@ -19,7 +20,7 @@ export const AddDashboardUserCmd = botControlCmd({
|
|||
async run({ pluginData, message: msg, args }) {
|
||||
const guild = await pluginData.state.allowedGuilds.find(args.guildId);
|
||||
if (!guild) {
|
||||
sendErrorMessage(pluginData, msg.channel, "Server is not using Zeppelin");
|
||||
pluginData.getPlugin(CommonPlugin).sendErrorMessage(msg, "Server is not using Zeppelin");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -36,10 +37,11 @@ export const AddDashboardUserCmd = botControlCmd({
|
|||
}
|
||||
|
||||
const userNameList = args.users.map((user) => `<@!${user.id}> (**${renderUserUsername(user)}**, \`${user.id}\`)`);
|
||||
sendSuccessMessage(
|
||||
pluginData,
|
||||
msg.channel,
|
||||
`The following users were given dashboard access for **${guild.name}**:\n\n${userNameList}`,
|
||||
);
|
||||
pluginData
|
||||
.getPlugin(CommonPlugin)
|
||||
.sendSuccessMessage(
|
||||
msg,
|
||||
`The following users were given dashboard access for **${guild.name}**:\n\n${userNameList}`,
|
||||
);
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue