the funny
This commit is contained in:
parent
5a555b7bb0
commit
09a573a2d3
118 changed files with 15738 additions and 24427 deletions
|
@ -1,6 +1,7 @@
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { isStaffPreFilter, sendErrorMessage } from "../../../pluginUtils";
|
||||
import { botControlCmd } from "../types";
|
||||
import { TextBasedChannelFields } from "discord.js";
|
||||
|
||||
export const ChannelToServerCmd = botControlCmd({
|
||||
trigger: ["channel_to_server", "channel2server"],
|
||||
|
@ -16,7 +17,7 @@ export const ChannelToServerCmd = botControlCmd({
|
|||
async run({ pluginData, message: msg, args }) {
|
||||
const channel = pluginData.client.channels.cache.get(args.channelId);
|
||||
if (!channel) {
|
||||
sendErrorMessage(pluginData, msg.channel, "Channel not found in cache!");
|
||||
await sendErrorMessage(pluginData, msg.channel, "Channel not found in cache!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -25,6 +26,8 @@ export const ChannelToServerCmd = botControlCmd({
|
|||
const guild = "guild" in channel ? channel.guild : null;
|
||||
const guildInfo = guild ? `${guild.name} (\`${guild.id}\`)` : "Not a server";
|
||||
|
||||
msg.channel.send(`**Channel:** ${channelName} (\`${channel.type}\`) (<#${channel.id}>)\n**Server:** ${guildInfo}`);
|
||||
await (msg.channel as TextBasedChannelFields).send(
|
||||
`**Channel:** ${channelName} (\`${channel.type}\`) (<#${channel.id}>)\n**Server:** ${guildInfo}`,
|
||||
);
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue