A Discord Bot for the Antistasi (ArmA 3) Community Discord Server
Project description
Antipetros Discordbot
None
Installation
still WiP
Features
Currently usable Cogs
AbsoluteTimeCog
Description
The base class that all cogs must inherit from.A cog is a collection of commands, listeners, and optional state to help group commands together. More information on them can be found on the :ref:
ext_commands_cogs
page.When inheriting from this class, the options shown in :class:
CogMeta
are equally valid here.Commands
REGISTER_TIMEZONE_CITY
- checks: in_allowed_channels, has_any_role
- signature:
<in_data>
TELL_ALL_REGISTERED_TIMEZONES
- checks: in_allowed_channels, has_any_role
TO_ABSOLUTE_TIMES
- checks: in_allowed_channels, has_any_role
AdministrationCog
Description
The base class that all cogs must inherit from.A cog is a collection of commands, listeners, and optional state to help group commands together. More information on them can be found on the :ref:
ext_commands_cogs
page.When inheriting from this class, the options shown in :class:
CogMeta
are equally valid here.Commands
ADD_TO_BLACKLIST
- checks: in_allowed_channels, has_any_role
- signature:
<user_id>
CONFIG_REQUEST
- aliases: send_config
- checks: dm_only
- signature:
[config_name=all]
DELETE_MSG
- checks: in_allowed_channels, has_any_role
- signature:
<msg_id>
LIST_CONFIGS
- checks: dm_only
MAKE_FEATURE_SUGGESTION
- signature:
<message>
OVERWRITE_CONFIG_FROM_FILE
- aliases: overwrite_config
- checks: dm_only
- signature:
<config_name>
RELOAD_ALL_EXT
- aliases: reload_all, reload
- checks: in_allowed_channels, has_any_role
REMOVE_FROM_BLACKLIST
- checks: in_allowed_channels, has_any_role
- signature:
<user_id>
SHOW_COMMAND_NAMES
- checks: in_allowed_channels, has_any_role
SHUTDOWN
- aliases: go_away, close, die, exit, turn_of
- checks: in_allowed_channels, has_any_role
TELL_UPTIME
- checks: in_allowed_channels, has_any_role
WRITE_DATA
- checks: in_allowed_channels, is_owner
GeneralDebugCog
Description
The base class that all cogs must inherit from.A cog is a collection of commands, listeners, and optional state to help group commands together. More information on them can be found on the :ref:
ext_commands_cogs
page.When inheriting from this class, the options shown in :class:
CogMeta
are equally valid here.Commands
MULTIPLE_QUOTES
- checks: in_allowed_channels, has_any_role
- signature:
[amount=10]
QUOTE
- checks: in_allowed_channels, has_any_role
ROLL
- checks: in_allowed_channels, has_any_role
- signature:
[target_time=1]
ImageManipulatorCog
Description
The base class that all cogs must inherit from.A cog is a collection of commands, listeners, and optional state to help group commands together. More information on them can be found on the :ref:
ext_commands_cogs
page.When inheriting from this class, the options shown in :class:
CogMeta
are equally valid here.Commands
AVAILABLE_STAMPS
- checks: in_allowed_channels, has_any_role
OTHER_MEMBERS_AVATAR
- checks: in_allowed_channels, has_any_role
- signature:
[members]...
STAMP_IMAGE
- aliases: antistasify
- checks: in_allowed_channels, has_any_role
- signature:
[stamp=ASLOGO1] [first_pos=bottom] [second_pos=right] [factor]
PerformanceCog
Description
The base class that all cogs must inherit from.A cog is a collection of commands, listeners, and optional state to help group commands together. More information on them can be found on the :ref:
ext_commands_cogs
page.When inheriting from this class, the options shown in :class:
CogMeta
are equally valid here.Commands
GET_COMMAND_STATS
- checks: in_allowed_channels, has_any_role
REPORT
- checks: in_allowed_channels, has_any_role
REPORT_LATENCY
- checks: in_allowed_channels, has_any_role
- signature:
[with_graph=True] [since_last_hours=24]
REPORT_MEMORY
- checks: in_allowed_channels, has_any_role
- signature:
[with_graph=True] [since_last_hours=24]
PurgeMessagesCog
Description
The base class that all cogs must inherit from.A cog is a collection of commands, listeners, and optional state to help group commands together. More information on them can be found on the :ref:
ext_commands_cogs
page.When inheriting from this class, the options shown in :class:
CogMeta
are equally valid here.Commands
PURGE_ANTIPETROS
- checks: in_allowed_channels, is_owner
- signature:
[and_giddi] [number_of_messages=1000]
PURGE_MSG_FROM_USER
- checks: in_allowed_channels, has_any_role
- signature:
<user> [number_of_messages=1000] [since]
SaveLinkCog
Description
An extension Cog to let users temporary save links.Saved links get posted to a certain channel and deleted after the specified time period from that channel (default in config). Deleted links are kept in the bots database and can always be retrieved by fuzzy matched name.
Checks against a blacklist of urls and a blacklist of words, to not store malicious links.
Commands
ADD_FORBIDDEN_WORD
- checks: log_invoker, allowed_channel_and_allowed_role_no_dm
- signature:
<word>
CLEAR_ALL_LINKS
- checks: log_invoker, allowed_channel_and_allowed_role_no_dm
- signature:
[sure=False]
DELETE_LINK
- checks: log_invoker, allowed_channel_and_allowed_role_no_dm
- signature:
<name> [scope=channel]
GET_ALL_LINKS
- checks: log_invoker, allowed_channel_and_allowed_role_no_dm
- signature:
[in_format=txt]
GET_FORBIDDEN_LIST
- checks: log_invoker, allowed_channel_and_allowed_role_no_dm
- signature:
[file_format=json]
GET_LINK
- checks: allowed_channel_and_allowed_role_no_dm
- signature:
<name>
REMOVE_FORBIDDEN_WORD
- checks: log_invoker, allowed_channel_and_allowed_role_no_dm
- signature:
<word>
SAVE_LINK
- checks: allowed_channel_and_allowed_role_no_dm
- signature:
<link> [link_name] [days_to_hold]
SaveSuggestionCog
Description
The base class that all cogs must inherit from.A cog is a collection of commands, listeners, and optional state to help group commands together. More information on them can be found on the :ref:
ext_commands_cogs
page.When inheriting from this class, the options shown in :class:
CogMeta
are equally valid here.Commands
AUTO_ACCEPT_SUGGESTIONS
- checks: dm_only
CLEAR_ALL_SUGGESTIONS
- checks: in_allowed_channels, has_any_role
- signature:
[sure=False]
GET_ALL_SUGGESTIONS
- checks: in_allowed_channels, has_any_role
- signature:
[report_template=basic_report.html.jinja]
MARK_DISCUSSED
- checks: in_allowed_channels, has_any_role
- signature:
[suggestion_ids...]
REMOVE_ALL_USERDATA
- aliases: remove_all_my_data
- checks: dm_only
REQUEST_MY_DATA
- checks: dm_only
USER_DELETE_SUGGESTION
- aliases: unsave_suggestion
- checks: dm_only
- signature:
<suggestion_id>
Dependencies
Currently only tested on Windows
Developed with Python Version 3.9.1
- graphviz<=
0.16
- aiohttp<=
3.7.3
- networkx<=
2.5
- pdfkit<=
0.6.1
- pyfiglet<=
0.8.post1
- pyowm<=
3.1.1
- WeasyPrint<=
52.2
- google_auth_oauthlib<=
0.4.2
- matplotlib<=
3.3.3
- psutil<=
5.8.0
- click<=
7.1.2
- fuzzywuzzy<=
0.18.0
- dpytest<=
0.0.22
- Jinja2<=
2.11.2
- pytz<=
2020.5
- watchgod<=
0.6
- async_property<=
0.2.1
- googletrans<=
4.0.0rc1
- discord<=
1.0.1
- gidappdata<=
0.1.1
- gidlogger<=
0.1.3
- google_api_python_client<=
1.12.8
- Pillow<=
8.1.0
- protobuf<=
3.14.0
- python-dotenv<=
0.15.0
- udpy<=
2.0.0
License
MIT
Development
Todo
TODOS FROM CODE
todo error_handler.py:
-
error_handler.py line 116:
rebuild whole error handling system
-
error_handler.py line 117:
make it so that creating the embed also sends it, with more optional args
todo admin_cog.py:
-
admin_cog.py line 60:
get_logs command
-
admin_cog.py line 61:
get_appdata_location command
-
admin_cog.py line 251:
make as embed
-
admin_cog.py line 257:
make as embed
-
admin_cog.py line 266:
make as embed
-
admin_cog.py line 272:
make as embed
-
admin_cog.py line 278:
make as embed
-
admin_cog.py line 285:
CRITICAL ! CHANGE TO SAVE TO JSON AND MAKE BOT METHOD FOR SAVING BLACKLIST JSON FILE
-
admin_cog.py line 288:
make as embed
-
admin_cog.py line 292:
make as embed
-
admin_cog.py line 300:
make as embed
-
admin_cog.py line 303:
make as embed
-
admin_cog.py line 305:
make as embed
-
admin_cog.py line 315:
make as embed
-
admin_cog.py line 320:
make as embed
-
admin_cog.py line 332:
make as embed
-
admin_cog.py line 335:
make as embed
-
admin_cog.py line 337:
make as embed
-
admin_cog.py line 348:
make as embed
todo performance_cog.py:
-
performance_cog.py line 65:
get_logs command
-
performance_cog.py line 66:
get_appdata_location command
-
performance_cog.py line 158:
limit amount of saved data, maybe archive it
todo purge_messages_cog.py:
-
purge_messages_cog.py line 67:
get_logs command
-
purge_messages_cog.py line 68:
get_appdata_location command
todo general_debug_cog.py:
-
general_debug_cog.py line 55:
create regions for this file
-
general_debug_cog.py line 56:
Document and Docstrings
todo image_manipulation_cog.py:
-
image_manipulation_cog.py line 55:
create regions for this file
-
image_manipulation_cog.py line 56:
Document and Docstrings
-
image_manipulation_cog.py line 242:
make as embed
-
image_manipulation_cog.py line 246:
make as embed
-
image_manipulation_cog.py line 253:
make as embed
-
image_manipulation_cog.py line 257:
maybe make extra attribute for input format, check what is possible and working. else make a generic format list
-
image_manipulation_cog.py line 272:
make as embed
todo save_link_cog.py:
-
save_link_cog.py line 36:
refractor 'get_forbidden_list' to not use temp directory but send as filestream or so
-
save_link_cog.py line 38:
need help figuring out how to best check bad link or how to format/normalize it
-
save_link_cog.py line 383:
refractor that monster of an function
todo save_suggestion_cog.py:
-
save_suggestion_cog.py line 57:
create report generator in different formats, at least json and Html, probably also as embeds and Markdown
-
save_suggestion_cog.py line 59:
Document and Docstrings
-
save_suggestion_cog.py line 211:
make as embed
-
save_suggestion_cog.py line 217:
make as embed
-
save_suggestion_cog.py line 233:
make as embed
-
save_suggestion_cog.py line 245:
make as embed
-
save_suggestion_cog.py line 249:
make as embed
-
save_suggestion_cog.py line 253:
make as embed
-
save_suggestion_cog.py line 258:
make as embed
-
save_suggestion_cog.py line 296:
make as embed
-
save_suggestion_cog.py line 299:
make as embed
-
save_suggestion_cog.py line 310:
make as embed
-
save_suggestion_cog.py line 314:
make as embed
-
save_suggestion_cog.py line 318:
make as embed
-
save_suggestion_cog.py line 323:
make as embed
-
save_suggestion_cog.py line 334:
make as embed
-
save_suggestion_cog.py line 369:
make as embed
-
save_suggestion_cog.py line 372:
make as embed
-
save_suggestion_cog.py line 376:
make as embed
idea render_new_cog_file.py:
- render_new_cog_file.py line 119:
create gui for this
idea antipetros_bot.py:
- antipetros_bot.py line 64:
Use an assistant class to hold some of the properties and then use the __getattr__ to make it look as one object, just for structuring
todo antipetros_bot.py:
-
antipetros_bot.py line 62:
create regions for this file
-
antipetros_bot.py line 63:
Document and Docstrings
todo sqldata_storager.py:
-
sqldata_storager.py line 35:
create regions for this file
-
sqldata_storager.py line 36:
update save link Storage to newer syntax (composite access)
-
sqldata_storager.py line 37:
Document and Docstrings
-
sqldata_storager.py line 38:
refractor to subfolder
General Todos
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
Hashes for antipetros_discordbot-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 258cd4b89c0d583c6b2875994a25f5acd864c34ffae1149d2c7aa49142236bdb |
|
MD5 | 8d76ca57b16d5fe4ad9e6fc00a96a34d |
|
BLAKE2b-256 | a688a63fe392c6fcb20d7b9f643d5c63713569c67cc879be9139b3f548905810 |
Hashes for antipetros_discordbot-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13e0eccf70630c9b6f0feefd9637c40dad01e7e1bcf0b562c35c517989c2ccad |
|
MD5 | 8064c80c44dcedc546c00c0190a99bd4 |
|
BLAKE2b-256 | 74ffb7bc543cb4c257b5871491b85f9608dd5367f7988cee8f094670e048bace |