3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-14 13:55:03 +00:00

Merge branch '240811_application_commands_merge_2' into next

This commit is contained in:
Dragory 2024-08-11 22:28:41 +03:00
commit 43b8017985
No known key found for this signature in database
279 changed files with 6192 additions and 3044 deletions

View file

@ -1,6 +1,6 @@
import { ApiPermissions } from "@zeppelinbot/shared/apiPermissions.js";
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
import { isStaffPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils.js";
import { isStaffPreFilter } from "../../../pluginUtils.js";
import { renderUsername } from "../../../utils.js";
import { botControlCmd } from "../types.js";
@ -19,7 +19,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");
void msg.channel.send("Server is not using Zeppelin");
return;
}
@ -36,10 +36,7 @@ export const AddDashboardUserCmd = botControlCmd({
}
const userNameList = args.users.map((user) => `<@!${user.id}> (**${renderUsername(user)}**, \`${user.id}\`)`);
sendSuccessMessage(
pluginData,
msg.channel,
`The following users were given dashboard access for **${guild.name}**:\n\n${userNameList}`,
);
msg.channel.send(`The following users were given dashboard access for **${guild.name}**:\n\n${userNameList}`);
},
});