Allows you to interact with the Cara API.
Project description
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)
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
cara_api-1.6.2.tar.gz
(4.2 kB
view details)
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 cara_api-1.6.2.tar.gz.
File metadata
- Download URL: cara_api-1.6.2.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20ebf4a57920beb9258fe6e99a46e755fd5dedad44abcc411a050c84e3981585
|
|
| MD5 |
31b839484504e22217547edc0caef0c0
|
|
| BLAKE2b-256 |
8e9eb10a6b3416a8d0cad8db82d8b24791d44b9c085d81888aa219022cf1d61e
|
File details
Details for the file cara_api-1.6.2-py3-none-any.whl.
File metadata
- Download URL: cara_api-1.6.2-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c94518cda4ed5069ce942248bcd87c114d2c03370b5bab0d4b3040e166f2fff3
|
|
| MD5 |
cb485c10ab4664411b0ab98151c1c54d
|
|
| BLAKE2b-256 |
0f61c625689cfae4304a8c8e9802ebf9b972b8d8e5ed12c7992126a864a39e50
|