A demo of gonebot.
There are two steps to build a gonebot.
- Load plugins.
gonebot.LoadPlugin(builtinplugins.Echo)
- Start gonebot backend.
gonebot.StartBackend("onebot11")
If successfully connected to your frontend, then congratulations, your bot is alive.
Take Lagrange.Onebot as an example.
{
"Type": "ReverseWebSocket",
"Host": "127.0.0.1",
"Port": 2048,
"Suffix": "/onebot/v11/ws",
"ReconnectInterval": 5000,
"HeartBeatInterval": 5000,
"AccessToken": ""
}