Open ajhalili2006 opened 4 years ago
The first suggestion is good, I find the second one rather pointless.
The first suggestion is good, I find the second one rather pointless.
- Putting the Token in the command will force users to use it in pm
- No bot should have a Root token so creating tokens with it is not possible anyway
- Having a command for the docs doesn't make much sense
- Getting the entire banlist is a bit heavy since its JSON, also I'm not sure why the bot would need a command for that
Okay. I'll note about that as this issue is an Work-in-Progress. Once this issue is finalized, then we can clear the stuff out, @SitiSchu.
Having a command for the API documentation still doesn't make sense
The query command is kinda superfluous if /user
shows the status anyway
No real reason to get the entire banlist with a bot command either
About the Issue
Integrating it with SpamWatch on joins is good, but can we extend SpamWatch on the following suggestions:
XXYYZZAABBCC
when triggered the/user
./spamwatch
command).First Suggestion: Manually checking status of a user when admins triggered
/user
When an admin triggers the
/user
command for userXXYYZZAABBCC
, the server/machine where the bot is hosted should contact the SpamWatch API (defaults toapi.spamwat.ch
if undefined inconfig.js
/config.json
) for the status of the user if he/she is banned.When checking for the ban status using this method, use the defined API token in the config as
SPAMWATCH_API_TOKEN
.Second Suggestion: Adding new way of interacting the API without extra lines of code
This suggestion will add a new command for that,
/spamwatch
. The usage of that command describes below as it says. See the SpamWatch API docs for details./spamwatch banlist
spamwatch banlist
/spamwatch query
<uid or username>
user <uid, username or reply>
as shortcut/spamwatch query 777000
/spamwatch about
<token>
/spamwatch about
/spamwatch docs
Legends:
< >
= Required[ ]
= optionalNotes
XXYYZZAABBCC
represents a Telegram user's unique ID, generated after signup per user.SPAMWATCH_API_TOKEN
represents a valid, working SpamWatch API token.~ The API token should be there in the config file instead of manually sending it to the bot.--force
flag is used and send the response as a JSON file.