2021-04-08 22:42:39 +00:00
|
|
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
|
|
import { Client, Guild, GuildMember, Message, NewsChannel, TextChannel, User } from "discord.js";
|
2021-04-04 15:17:46 +00:00
|
|
|
|
|
|
|
export type Server = {
|
2021-04-06 00:37:36 +00:00
|
|
|
readonly id: string
|
2021-04-04 15:17:46 +00:00
|
|
|
server_id: string
|
|
|
|
locale: string
|
2021-04-07 11:18:36 +00:00
|
|
|
prefix: string[]
|
2021-04-04 15:17:46 +00:00
|
|
|
|
|
|
|
shortlinks: boolean
|
2021-04-07 11:18:36 +00:00
|
|
|
sourcefinder: boolean
|
2021-04-04 15:17:46 +00:00
|
|
|
embeds: boolean
|
|
|
|
interactiontext: boolean
|
|
|
|
|
2021-04-06 00:37:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export type Usage = {
|
|
|
|
readonly id: string
|
|
|
|
name: string,
|
|
|
|
type: string
|
|
|
|
amount: number
|
2021-04-08 22:42:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export type Command = {
|
|
|
|
name: string;
|
|
|
|
description: string;
|
|
|
|
aliases: string[];
|
|
|
|
module: string;
|
|
|
|
cooldown: number;
|
|
|
|
guild: boolean;
|
|
|
|
dev: boolean;
|
|
|
|
nsfw: boolean;
|
|
|
|
AuthorPermissions: string;
|
|
|
|
hidden: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export type Context = {
|
|
|
|
client: Client;
|
|
|
|
guild: Guild | null;
|
|
|
|
message: Message;
|
|
|
|
channel: TextChannel | NewsChannel;
|
|
|
|
author: User;
|
|
|
|
member: GuildMember | null;
|
|
|
|
supabase: SupabaseClient;
|
|
|
|
guildSettings: Server;
|
|
|
|
config: Config;
|
|
|
|
isDeveloper: string[]
|
|
|
|
}
|
|
|
|
|
|
|
|
// ! Config Typings
|
|
|
|
|
|
|
|
interface Config {
|
|
|
|
pkg: Pkg;
|
|
|
|
variables: Variables;
|
|
|
|
apis: Apis;
|
|
|
|
token: string;
|
|
|
|
supabase: Supabase;
|
|
|
|
developers: Developer[];
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Developer {
|
|
|
|
id: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Supabase {
|
|
|
|
url: string;
|
|
|
|
key: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Apis {
|
|
|
|
sheri: string;
|
|
|
|
yiffrest: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Variables {
|
|
|
|
name: string;
|
|
|
|
prefix: string[];
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Pkg {
|
|
|
|
name: string;
|
|
|
|
version: string;
|
|
|
|
description: string;
|
|
|
|
main: string;
|
|
|
|
scripts: Scripts;
|
|
|
|
repository: Repository;
|
|
|
|
keywords: any[];
|
|
|
|
author: string;
|
|
|
|
license: string;
|
|
|
|
bugs: Bugs;
|
|
|
|
homepage: string;
|
|
|
|
dependencies: Dependencies;
|
|
|
|
devDependencies: DevDependencies;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface DevDependencies {
|
|
|
|
'@types/node': string;
|
|
|
|
'@types/ws': string;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Dependencies {
|
|
|
|
'@supabase/supabase-js': string;
|
|
|
|
'@thaldrin/sourcefinder': string;
|
|
|
|
chalk: string;
|
|
|
|
'discord.js': string;
|
|
|
|
winston: string;
|
|
|
|
'winston-daily-rotate-file': string;
|
|
|
|
yiff: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Bugs {
|
|
|
|
url: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Repository {
|
|
|
|
type: string;
|
|
|
|
url: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Scripts {
|
|
|
|
build: string;
|
|
|
|
start: string;
|
|
|
|
dev: string;
|
|
|
|
'update:subs': string;
|
2021-04-04 15:17:46 +00:00
|
|
|
}
|