Cara API
Python Package developed by Red_wolf2467
This package is designed to make it easier for you to work with the Cara API (developed by CatC_guy). The package is based on the data found on the API doc page of the BOT / API.
Now follow sample codes that you can simply copy / paste and use.
Chatfilter
from cara_api import CaraAPI
caraAPI = CaraAPI("YOUR API-KEY")
bad_word_list = ["word1", "word2"]
request = caraAPI.chatfilter(message=message.content, levenshtein=2 ,FilteredWords=bad_word_list, GuildID=message.guild.id,
ChannelID=message.channel.id, AuthorID=message.author.id, MessageID=message.id,
GuildName=message.guild.name, ChannelName=message.channel.name, AuthorName=message.author.name, log=True)
# OnlyASCII = OPTIONAL; True = Delete non ASCII symbols, False = Ignore non ASCII symbols
# GoodWords = OPTIONAL; List of words that are allowed (for words that are misrecognized, structure as in "bad_word_list ")
print(request.result) # INT
# OK = 0, //Not filtered
# CustomBadWord = 1, //Direct Match
# Levenshtein = 2, //Disguised Bad Word
# Leet = 3, //Levenshtein + Leet
# NSFW = 4, //NSFW Content (not returned yet)
# BannedMessage = 5, //Registered Spam Message
# SuspiciousActivity = 6, //User was flagged for suspicious activity
# BotActivity = 7, //Bot activity
# SpammerNotAllowed = 8 //Registered spammer, not allowed on server
print(request.reason) # STRING
Uer
from cara_api import CaraAPI
caraAPI = CaraAPI("YOUR API-KEY")
request = caraAPI.get_user(user_id=message.author.id)
print(request.user_name)
print(request.isSpammer)
print(request.reason)
Metadata
Release files for cara-api 1.6.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cara_api-1.6.2.tar.gz | 4.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cara_api-1.6.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.9 kB
Release files / cara_api-1.6.2.tar.gz
| Download URL | cara_api-1.6.2.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20ebf4a57920beb9258fe6e99a46e755fd5dedad44abcc411a050c84e3981585
|
|
BLAKE2b-256 checksum How to use checksums |
8e9eb10a6b3416a8d0cad8db82d8b24791d44b9c085d81888aa219022cf1d61e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Release files / cara_api-1.6.2-py3-none-any.whl
| Download URL | cara_api-1.6.2-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c94518cda4ed5069ce942248bcd87c114d2c03370b5bab0d4b3040e166f2fff3
|
|
BLAKE2b-256 checksum How to use checksums |
0f61c625689cfae4304a8c8e9802ebf9b972b8d8e5ed12c7992126a864a39e50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|