Add !slowmode command
This commit is contained in:
parent
2d8decdb4f
commit
5215dd0738
10 changed files with 122 additions and 2 deletions
|
@ -2,7 +2,7 @@ import { utilityCmd } from "../types";
|
|||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
import { getInviteInfoEmbed } from "../functions/getInviteInfoEmbed";
|
||||
import { parseInviteCodeInput, resolveInvite, resolveUser } from "../../../utils";
|
||||
import { isValidSnowflake, parseInviteCodeInput, resolveInvite, resolveUser } from "../../../utils";
|
||||
import { getUserInfoEmbed } from "../functions/getUserInfoEmbed";
|
||||
import { resolveMessageTarget } from "../../../utils/resolveMessageTarget";
|
||||
import { canReadChannel } from "../../../utils/canReadChannel";
|
||||
|
@ -11,6 +11,7 @@ import { getChannelInfoEmbed } from "../functions/getChannelInfoEmbed";
|
|||
import { getServerInfoEmbed } from "../functions/getServerInfoEmbed";
|
||||
import { getChannelId } from "knub/dist/utils";
|
||||
import { getGuildPreview } from "../functions/getGuildPreview";
|
||||
import { getSnowflakeInfoEmbed } from "../functions/getSnowflakeInfoEmbed";
|
||||
|
||||
export const InfoCmd = utilityCmd({
|
||||
trigger: "info",
|
||||
|
@ -93,6 +94,13 @@ export const InfoCmd = utilityCmd({
|
|||
}
|
||||
}
|
||||
|
||||
// 7. Arbitrary ID
|
||||
if (isValidSnowflake(value)) {
|
||||
const embed = getSnowflakeInfoEmbed(pluginData, value, true);
|
||||
message.channel.createMessage({ embed });
|
||||
return;
|
||||
}
|
||||
|
||||
// 7. No can do
|
||||
sendErrorMessage(pluginData, message.channel, "Could not find anything with that value");
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue