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
import config from "./config";
import client from "./src/handler/client/Client"
let Bot = new client(config)
import { Discord } from "@thaldrin/eu"
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 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"
})
import chalk from "chalk"

View File

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

View File

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