move to eu

This commit is contained in:
Lio Young 2021-09-11 13:40:53 +02:00
parent b5e08eabcc
commit 7534d2d8e5
4 changed files with 31 additions and 15 deletions

View File

@ -1,4 +1,17 @@
//@ts-ignore //@ts-ignore
import config from "./config"; import config from "./config";
import client from "./src/handler/client/Client" import { Discord } from "@thaldrin/eu"
let Bot = new client(config) import { Intents } from "discord.js";
import { join } from 'path'
let Bot = new Discord.Client({
// @ts-ignore
token: config.discord?.token,
commands: join(__dirname, "src", "discord", 'commands'),
events: join(__dirname, "src", "discord", 'events'),
options: {
commandCategories: true,
intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES]
}
})

View File

@ -1,8 +1,9 @@
import { ShardingManager } from "discord.js"; import { Discord } from "@thaldrin/eu";
import config from "./config"; import config from "./config";
import figlet from "figlet" import figlet from "figlet"
let Sharder = new ShardingManager('./build/index.js', {
token: config.token, let Sharder = new Discord.ShardingManager('./build/index.js', {
token: config.discord?.token,
totalShards: "auto" totalShards: "auto"
}) })
import chalk from "chalk" import chalk from "chalk"

View File

@ -1,6 +1,6 @@
import { SupabaseClient } from "@supabase/supabase-js"; import { SupabaseClient } from "@supabase/supabase-js";
import { Client, Guild, GuildMember, Message, NewsChannel, TextChannel, User } from "discord.js"; import { Client, Guild, GuildMember, Message, NewsChannel, TextChannel, User } from "discord.js";
import Thaldrin from "../handler/client/Client"; import { EuClient } from "@thaldrin/eu/build/misc/types";
export type Features = export type Features =
| "shortlinks" | "shortlinks"
@ -56,14 +56,14 @@ export type Command = {
export type Context = { export type Context = {
client: Thaldrin; client: EuClient;
args: string[] args: string[]
guild: Guild | null; guild: Guild | null;
message: Message; message: Message;
channel: TextChannel | NewsChannel; channel: TextChannel | NewsChannel;
author: User; author: User;
member: GuildMember | null; member: GuildMember | null;
supabase: SupabaseClient; modulus: any;
settings: Server; settings: Server;
config: Config; config: Config;
isDeveloper: string[] isDeveloper: string[]
@ -88,7 +88,15 @@ export interface Config {
/** /**
* Discord API Token * Discord API Token
*/ */
token: string; discord?: {
token?: string
};
/**
* Revolt API Token
*/
revolt?: {
token?: string
};
/** /**
* Config Strings for Supabase * Config Strings for Supabase
* Thaldrin's Database * Thaldrin's Database
@ -183,9 +191,6 @@ export interface Variables {
} }
website: string website: string
invite: any; invite: any;
prometheus: {
port: number
}
} }
export interface Pkg { export interface Pkg {

View File

@ -53,7 +53,4 @@ export default {
color: "#ff995d", color: "#ff995d",
website: "thaldr.in", website: "thaldr.in",
invite: "https://t8.pm/legacy-invite", invite: "https://t8.pm/legacy-invite",
prometheus: {
port: 3621
}
} }