Files
website/docs/tutorial/en/05-overview/start.md
2023-09-22 21:46:37 -05:00

770 B

title, sidebar_position
title sidebar_position
index 1

start

initiate

We start at the humble index.js. This is where this bot will start. Notice the Sern.init, hmm... I wonder what that does. (it initiates sern) A few options are availible, which are conveniently labeled already. Make sure to glance here.

dependencies

This requires a little more explaning. In makeDependencies, add necessary objects to run your application. you and sern, will use these structures. In the template you have now, we only initiate the client, which is necessary for the handler to run.

await makeDependencies({
    build: (root) => root.add({
        '@sern/client': single(() => client) // we register our client into sern 
    })
})