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.
|
# Function that will be called if stats are posted successfully.
|
||||||
async def on_success_posting():
|
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 = (
|
autopost = (
|
||||||
boticord_client.autopost()
|
boticord_client.autopost()
|
||||||
.init_stats(get_stats)
|
.init_stats(get_stats)
|
||||||
.on_success(on_success_posting)
|
.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
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -48,7 +48,7 @@ setup(
|
||||||
description="A Python wrapper for BotiCord API",
|
description="A Python wrapper for BotiCord API",
|
||||||
long_description=README,
|
long_description=README,
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
url="https://github.com/boticord/boticordpy",
|
url="https://github.com/boticord/boticordpy",
|
||||||
author="Marakarka",
|
author="Marakarka",
|
||||||
author_email="support@kerdoku.top",
|
author_email="support@kerdoku.top",
|
||||||
|
|
Loading…
Reference in a new issue