Skip to main content

A Discord Bot for the Antistasi (ArmA 3) Community Discord Server

Project description

Antipetros Discordbot

Anti-Petros Avatar

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
    • signature:
      <word>
      

  • CLEAR_ALL_LINKS

    • checks: log_invoker, allowed_channel_and_allowed_role
    • signature:
      [sure=False]
      

  • DELETE_LINK

    • checks: log_invoker, allowed_channel_and_allowed_role
    • signature:
      <name> [scope=channel]
      

  • GET_ALL_LINKS

    • checks: log_invoker, allowed_channel_and_allowed_role
    • signature:
      [in_format=txt]
      

  • GET_FORBIDDEN_LIST

    • checks: log_invoker, allowed_channel_and_allowed_role
    • signature:
      [file_format=json]
      

  • GET_LINK

    • checks: allowed_channel_and_allowed_role
    • signature:
      <name>
      

  • REMOVE_FORBIDDEN_WORD

    • checks: log_invoker, allowed_channel_and_allowed_role
    • signature:
      <word>
      

  • SAVE_LINK

    • checks: allowed_channel_and_allowed_role
    • 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:


todo admin_cog.py:


todo performance_cog.py:


todo purge_messages_cog.py:


todo general_debug_cog.py:


todo image_manipulation_cog.py:


todo save_link_cog.py:


todo save_suggestion_cog.py:


idea render_new_cog_file.py:


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:


todo sqldata_storager.py:


General Todos

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

antipetros_discordbot-0.1.9.tar.gz (23.8 MB view hashes)

Uploaded Source

Built Distribution

antipetros_discordbot-0.1.9-py2.py3-none-any.whl (23.9 MB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page