mirror of
https://github.com/boticord/boticordpy.git
synced 2024-09-22 19:32:01 +03:00
updated examples/autopost.py
This commit is contained in:
parent
bde481924e
commit
e26366da74
2 changed files with 7 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue