updated examples/autopost.py

This commit is contained in:
grey-cat-1908 2023-06-05 13:11:25 +03:00
parent bde481924e
commit e26366da74
2 changed files with 7 additions and 5 deletions

View file

@ -15,15 +15,17 @@ async def get_stats():
# Function that will be called if stats are posted successfully.
async def on_success_posting():
print("stats posting successfully")
print("wow stats posting works")
boticord_client = BoticordClient("Bot your_api_token", version=2)
boticord_client = BoticordClient(
"your_boticord_api_token", version=3
) # <--- BotiCord API token
autopost = (
boticord_client.autopost()
.init_stats(get_stats)
.on_success(on_success_posting)
.start()
.start("id_of_your_bot") # <--- ID of your bot
)
bot.run("bot token")
bot.run("bot token") # <--- Discord bot's token