From 41630e608892905c3662c819ceffbc5db6ab1f7d Mon Sep 17 00:00:00 2001 From: MadCat9958 Date: Sat, 1 Jul 2023 13:46:01 +0300 Subject: [PATCH] migration guide --- MIGRATION.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/MIGRATION.md b/MIGRATION.md index d4105f8..eda2e9f 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -50,6 +50,20 @@ autopost = ( ) ``` +Also, JSON's keys for bot stats must be changed: + +### Was: +```py +async def get_stats(): + return {"servers": len(bot.guilds), "shards": 0, "users": len(bot.users)} +``` + +### Became: +```py +async def get_stats(): + return {"guilds": len(bot.guilds), "shards": 0, "members": len(bot.users)} +``` + ## Webhook or websocket... that is the question Webhooks are no longer supported in boticordpy. You can find guide how to use boticord websocket [here](https://github.com/boticord/boticordpy/blob/master/examples/websocket.py).