Skip to content
This repository has been archived by the owner on Apr 19, 2021. It is now read-only.

Setup Creating a client

SirTenzin edited this page Mar 28, 2021 · 1 revision

Creating a client can be as easy as installing a module!

Lets start off with our index.js

// no code :(

As you can see, we dont have much code here, lets fix that

const { Client } = require('dogesword');
const client = new Client({
    isBot: true,
    prefix: "uwu!"
});

Now we have a client instance with the "uwu!" prefix. Now we can add a command listener

client.on("command", async(cmd) => {
   if(cmd.content.startsWith("uwu!amipog") {
      return cmd.room.send("no you stink :)");
   }
});

Here we have made a simple "amipog" command, returning a nice message.

Clone this wiki locally