Motion bot list status api tool
Project description
MotionBotList
Interact with Motion Botlist with python scripts.
Examples on host to use
Here is a quick example on how you can update your bots status.
import MotionBotList
bot_list = MotionBotList.connect("your_api_key")
bot_list.update(bot_id, server_count) # Add your bots data here
Run the script and your bots status should be updated. If there was a error there will be a exception. To handle exceptions, you could do the following:
import MotionBotList
from MotionBotList import Exceptions
bot_list = MotionBotList.connect("your_api_key")
try:
bot_list.update(bot_id, server_count)
except Exceptions.Forbidden:
print("You don't have access to update the status, invalid token or wrong bot")
except Exceptions.BotNotFound:
print("The bot ID was invalid")
except Exception as error:
print(error)
Get a bots info
With this function you can get all data from a bot
import MotionBotList
bot_list = MotionBotList.connect("your_api_key")
bot = bot_list.get_bot(bot_id)
print(bot.name)
print(bot.owner_id)
This function will return a bot object, or None if you don't have a API key. This function will raise the BotNotFound exception if not bot was found
Get bot votes
Get all users who voted for the bot
import MotionBotList
bot_list = MotionBotList.connect("your_api_key")
votes = bot_list.get_votes(bot_id)
for user in votes:
print(user.user_name)
print(user.vote_time)
Will return a list with a voteuser object.
Objects
-
botobj - Return when you get a bot
- id
- Returns the bot_id as str
- name
- Returns the bot name
- avatar
- Returns the bots avatar code (not the url just the code)
- avatar_url
- Returns the bots avatar url (Raw image link to discord cdn)
- status
- Returns the last bots status report to our site (Might be inacruate)
- co_owners
- Returns a list with co-owners
- discord
- Returns the invite code to the support server
- invite
- Returns the invite url for the bot
- lib
- Returns the bots lib selected on the site
- list_date
- Returns the date that the bot was listed (YYYY-MM-DD format)
- owner_id
- Returns the bots onwer ID
- owner_name
- Returns the bots owners' name (User#0000)
- prefix
- Returns the bots prefix
- servers
- Returns the number of servers posted to our site (None if no server count was posted)
- website
- Returns the bots website (None if no website was provided)
- tops
- Returns a list of top features selected
- vanity_url
- Returns the vanity url of the bot (None if bot doesn't have a vanity url)
- id
-
voteobj - The object to return when getting bot votes
- vote_time
- Returns the time the user has voted (YYYY-DD-MM HH:MM:SS)
- is_user
- If it is a user, or just a vote holder (See more info in our vote docs about this)
- user_id
- Returns the users id
- user_name
- Returns the users name (User#0000)
- vote_time
Voting system
A short description on how our voting system works.
Every beginning of a month we reset all votes, if user vote on that day their vote will stay on the bots page until the beggining of the next month. A user can vote once every 12 hours, their vote will be removed from the list and will be replaced with a place holder. This is when we set the is_user to false.
Creadits
This package has been fully developed by TechnicePepijn#0995 for more support visit our discord server
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file motionbotlist-1.0.3.tar.gz.
File metadata
- Download URL: motionbotlist-1.0.3.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab2358bd19a67aba00f90a3cb1c7b0259395cf8a1a8177bb568433b320b2592f
|
|
| MD5 |
9e5fb6e9447cdc7262770a7311366bcc
|
|
| BLAKE2b-256 |
3fc3222238896abe6ad92c3b1b96efb39af10f52566fe4a5a118cfd714626da2
|
File details
Details for the file motionbotlist-1.0.3-py3-none-any.whl.
File metadata
- Download URL: motionbotlist-1.0.3-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c98b8d088a8c0f0281532d01b82b10c558b199ba6c55179805d02351273e553
|
|
| MD5 |
612da85411eb16aabb052fb66998b993
|
|
| BLAKE2b-256 |
1523a91976d9d667d4cc139bae44113822b5c0f7945e4ee9c2cb9aa17550faba
|