mirror of
https://github.com/jaronpate/unicord.git
synced 2026-10-18 21:47:40 +00:00
cleaning up client merging
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
// Here we are defining what we want the interface to look like so that there is a goal to work towards
|
||||
// Things here are not necessarily implemented in the actual code but show what we want it to look like to use the library
|
||||
|
||||
// import { unicord, t } from 'unicord';
|
||||
import { Expectation, Unicord, UnicordArgumentType } from '../rewrite/index.ts';
|
||||
|
||||
const DISCORD_APPLICATION_ID = process.env.APPLICATION_ID!;
|
||||
const DISCORD_CLIENT_TOKEN = process.env.BOT_TOKEN!;
|
||||
|
||||
// Create a new client instance
|
||||
// Most usage will be via chaining methods off the client instance
|
||||
const client = new Unicord({
|
||||
token: process.env.BOT_TOKEN!,
|
||||
application_id: DISCORD_APPLICATION_ID,
|
||||
token: DISCORD_CLIENT_TOKEN,
|
||||
})
|
||||
.registerChatCommand(
|
||||
'ping',
|
||||
@@ -73,8 +74,6 @@ const client = new Unicord({
|
||||
console.log(`Logged in as ${payload.user.username}`);
|
||||
});
|
||||
|
||||
// client.login(DISCORD_CLIENT_TOKEN);
|
||||
|
||||
// Allow use of "child" instances inside parent instance
|
||||
const etc = new Unicord().registerChatCommand(
|
||||
'zing',
|
||||
@@ -101,4 +100,4 @@ const etc = new Unicord().registerChatCommand(
|
||||
|
||||
client.use(etc);
|
||||
|
||||
client.login();
|
||||
client.login();
|
||||
|
||||
Reference in New Issue
Block a user