UNPKG

@beni69/cmd

Version:

The command handler from my discord bot

19 lines 861 B
import Discord from "discord.js"; import Trigger from "./Trigger"; export declare class Logger { readonly client: Discord.Client; channels: Array<Discord.TextChannel | Discord.DMChannel>; format: LoggerFormat; constructor(client: Discord.Client, { channel, format }: LoggerOptions); log(trigger: Trigger, format?: LoggerFormat): void; send(str: string): void; getFormat(trigger: Trigger, format: LoggerFormat | string): string; } export default Logger; export interface LoggerOptions { channel: Discord.Snowflake | Array<Discord.Snowflake>; format: LoggerFormat; } export declare type LoggerFormat = `$${LoggerFormatTypes}$`[] | string | string[]; export declare type LoggerFormatTypes = "authorName" | "authorTag" | "content" | "channelName" | "channelTag" | "serverName" | "timestamp"; //# sourceMappingURL=Logging.d.ts.map