@beni69/cmd
Version:
The command handler from my discord bot
25 lines • 1.16 kB
TypeScript
import { ApplicationCommand, ApplicationCommandData, Collection, Guild, GuildChannel, GuildMember, GuildResolvable, MessageEmbed, Role, User } from "discord.js";
import { ApplicationCommandOptionTypes } from "discord.js/typings/enums";
export declare function cleanDB(): Promise<void>;
export declare function newEmbed(title: string, msg: string): MessageEmbed;
export declare const resolveUser: (str: string) => string;
/**
* get the type and resolved data (if possible) from a string
* @example user: <@123...> or <@!123...>
* @example role: <@&123...>
* @example channel: <#123...>
* @param guild the discordjs client to use for resolving
* @param x the option to resolve
*/
export declare const resolveMention: (guild: Guild, x: any) => {
type: keyof typeof ApplicationCommandOptionTypes;
value: any;
user?: User | undefined;
member?: GuildMember | undefined;
channel?: GuildChannel | undefined;
role?: Role | undefined;
};
export declare const slashCommandsChanged: (_o: Collection<string, ApplicationCommand<{
guild: GuildResolvable;
}>>, _n: ApplicationCommandData[]) => boolean;
//# sourceMappingURL=Utils.d.ts.map