```ts import { SapphireClient } from "@sapphire/framework"; import 'dotenv/config' class Client ext

import { SapphireClient } from "@sapphire/framework";
import 'dotenv/config'

class Client extends SapphireClient {
    public constructor() {
        super({
            intents: ['GUILDS', 'GUILD_MESSAGES', 'GUILD_MEMBERS', 'DIRECT_MESSAGES', 'GUILD_MESSAGE_REACTIONS'],
            partials: ["CHANNEL", "MESSAGE", "GUILD_MEMBER"],
            defaultPrefix: "!",
            presence: {
                status: "idle",
                activities: [{
                    name: 'Made With Sapphire',
                    type: 'COMPETING',
                }]
            },
        })
    }

    public override login(token?: string) {
        return super.login(token);
    };
}

const client = new Client()

client.login(process.env.token).then(() => {
    console.log(`Logged in~`);
})
Was this page helpful?