rename app data API
Align docs, examples, and tests with AppData and NoData Update handler, scene, runner, and plugin generics to the new naming Ignore .codex and record the cleanup in the changelog
This commit is contained in:
@@ -13,17 +13,17 @@ Core concepts:
|
||||
|
||||
Example usage:
|
||||
|
||||
bot, err := laniakea.NewBot[*mydb.DBContext](laniakea.LoadOptsFromEnv())
|
||||
bot, err := laniakea.NewBot[*mydb.AppData](laniakea.LoadOptsFromEnv())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
bot.DatabaseContext(myDB).
|
||||
bot.SetAppData(myDB).
|
||||
AddUpdateType(tgapi.UpdateTypeMessage).
|
||||
AddPrefixes("/", "!").
|
||||
AddPlugins(&startPlugin, &helpPlugin).
|
||||
AddMiddleware(authMiddleware, logMiddleware).
|
||||
AddRunner(cleanupRunner).
|
||||
AddL10n(l10n.New())
|
||||
SetL10n(l10n.New())
|
||||
|
||||
return bot.Run()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user