Skip to main content

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

Project description

Antipetros Discordbot

Antipetros Discordbot Avatar


ToC


Bot-Name:

AntiPetros

Version:

1.1.2


Installation

PyPi

pip install antipetros_discordbot==1.1.2

Usage

  • antipetrosbot clean

    Cli command to clean the 'APPDATA' folder that was created.

  • antipetrosbot run

    Standard way to start the bot and connect it to discord.

  • antipetrosbot stop

    Cli way of autostoping the bot.


Description


Features

Currently usable Cogs

AdministrationCog

Description

Short Description

Commands and methods that help in Administrate the Discord Server.

Config Name

administration

Cog State Tags

- DOCUMENTATION_MISSING

- OUTDATED

- NEEDS_REFRACTORING

- FEATURE_MISSING

- UNTESTED

- OPEN_TODOS
Commands
  • DELETE_MSG

    • aliases: delete.msg, delete+msg, delete-msg, deletemsg

    • is hidden: True

    • usage:

      None
      


AntistasiLogWatcherCog

Description

Short Description

soon

Config Name

antistasi_log_watcher

Cog State Tags

- DOCUMENTATION_MISSING

- FEATURE_MISSING

- UNTESTED

+ WORKING
Commands
  • GET_NEWEST_LOGS

    • help:

      Gets the newest log files from the Dev Drive.

      If the log file is bigger than current file size limit, it will provide it zipped.

      Tries to fuzzy match both server and sub-folder.

      Args: server (str): Name of the Server sub_folder (str): Name of the sub-folder e.g. Server, HC_0, HC_1,... amount (int, optional): The amount of log files to get. standard max is 5 . Defaults to 1.

    • aliases: getnewestlogs, get.newest.logs, get+newest+logs, get-newest-logs

    • is hidden: False

    • usage:

      @AntiPetros get_newest_logs mainserver_1 server
      

  • GET_NEWEST_MOD_DATA

    • help:

      Gets the required mods for the Server.

      Provides the list as embed and Arma3 importable html file.

      Args: server (str): Name of the Antistasi Community Server to retrieve the mod list.

    • aliases: get.newest.mod.data, getnewestmoddata, get+newest+mod+data, get-newest-mod-data

    • is hidden: False

    • usage:

      @AntiPetros get_newest_mod_data mainserver_1
      


BotAdminCog

Description

Short Description

Commands and methods that are needed to Administrate the Bot itself.

Config Name

bot_admin

Cog State Tags

- DOCUMENTATION_MISSING

- FEATURE_MISSING
Commands
  • ADD_TO_BLACKLIST

    • aliases: add-to-blacklist, addtoblacklist, add+to+blacklist, add.to.blacklist

    • is hidden: True

    • usage:

      None
      

  • ADD_WHO_IS_PHRASE

    • aliases: add.who.is.phrase, add+who+is+phrase, addwhoisphrase, add-who-is-phrase

    • is hidden: True

    • usage:

      None
      

  • ALL_ALIASES

    • aliases: all.aliases, all+aliases, all-aliases, allaliases

    • is hidden: True

    • usage:

      None
      

  • INVOCATION_PREFIXES

    • aliases: invocationprefixes, invocation.prefixes, invocation-prefixes, invocation+prefixes

    • is hidden: True

    • usage:

      None
      

  • LIFE_CHECK

    • aliases: life.check, life-check, are-you-there, life+check, you_dead?, lifecheck, poke-with-stick

    • is hidden: True

    • usage:

      None
      

  • REMOVE_FROM_BLACKLIST

    • aliases: remove.from.blacklist, remove-from-blacklist, removefromblacklist, remove+from+blacklist

    • is hidden: True

    • usage:

      None
      

  • SELF_ANNOUNCEMENT

    • aliases: self-announcement, self+announcement, selfannouncement, self.announcement

    • is hidden: True

    • usage:

      None
      

  • SEND_LOG_FILE

    • help:

      Gets the log files of the bot and post it as a file to discord.

      You can choose to only get the newest or all logs.

      Args: which_logs (str, optional): [description]. Defaults to 'newest'. other options = 'all'

    • aliases: send+log+file, send.log.file, sendlogfile, send-log-file

    • is hidden: True

    • usage:

      @AntiPetros send_log_file all
      

  • TELL_UPTIME

    • aliases: telluptime, tell.uptime, tell+uptime, tell-uptime

    • is hidden: True

    • usage:

      None
      


CommunityServerInfoCog

Description

Short Description

soon

Config Name

community_server_info

Cog State Tags

- EMPTY

- DOCUMENTATION_MISSING

- CRASHING

- OUTDATED

- FEATURE_MISSING

- UNTESTED
Commands
  • CURRENT_ONLINE_SERVER

    • help:

      Shows all server of the Antistasi Community, that are currently online.

      Testserver_3 and Eventserver are excluded as they usually are password guarded.

    • aliases: current.online.server, currentonlineserver, current-online-server, current+online+server

    • is hidden: False

    • usage:

      @AntiPetros current_online_server
      

  • CURRENT_PLAYERS

    • help:

      Show all players that are currently online on one of the Antistasi Community Server.

      Shows Player Name, Player Score and Time Played on that Server.

      Args: server (str): Name of the Server, case insensitive.

    • aliases: current-players, currentplayers, current+players, current.players

    • is hidden: False

    • usage:

      @AntiPetros current_players mainserver_1
      

  • EXCLUDE_FROM_SERVER_STATUS_NOTIFICATION

    • aliases: excludefromserverstatusnotification, exclude-from-server-status-notification, exclude.from.server.status.notification, exclude+from+server+status+notification

    • is hidden: False

    • usage:

      None
      

  • UNDO_EXCLUDE_FROM_SERVER_STATUS_NOTIFICATION

    • aliases: undoexcludefromserverstatusnotification, undo.exclude.from.server.status.notification, undo+exclude+from+server+status+notification, undo-exclude-from-server-status-notification

    • is hidden: False

    • usage:

      None
      


ConfigCog

Description

Short Description

Cog with commands to access and manipulate config files, also for changing command aliases. Almost all are only available in DM's

commands are hidden from the help command.

Config Name

config

Cog State Tags

- NEEDS_REFRACTORING

- FEATURE_MISSING

- OPEN_TODOS
Commands
  • ADD_ALIAS

    • help:

      Adds an alias for a command.

      Alias has to be unique and not spaces.

      Args: command_name (str): name of the command alias (str): the new alias.

    • aliases: addalias, add+alias, add.alias, add-alias

    • is hidden: True

    • usage:

      @AntiPetros add_alias flip_coin flip_it
      

  • CHANGE_SETTING_TO

    • help:

      NOT IMPLEMENTED

    • is hidden: True

    • usage:

      None
      

  • CONFIG_REQUEST

    • help:

      Returns a Config file as and attachment, with additional info in an embed.

      Args: config_name (str, optional): Name of the config, or 'all' for all configs. Defaults to 'all'.

    • is hidden: True

    • usage:

      None
      

  • LIST_CONFIGS

    • help:

      NOT IMPLEMENTED

    • aliases: list+configs, listconfigs, list.configs, list-configs

    • is hidden: True

    • usage:

      None
      

  • OVERWRITE_CONFIG_FROM_FILE

    • help:

      NOT IMPLEMENTED

    • is hidden: True

    • usage:

      None
      

  • SHOW_CONFIG_CONTENT

    • help:

      NOT IMPLEMENTED

    • is hidden: True

    • usage:

      None
      

  • SHOW_CONFIG_CONTENT_RAW

    • help:

      NOT IMPLEMENTED

    • is hidden: True

    • usage:

      None
      


FaqCog

Description

Short Description

Creates Embed FAQ items.

Config Name

faq

Cog State Tags

- DOCUMENTATION_MISSING

- FEATURE_MISSING

- UNTESTED

+ WORKING
Commands
  • POST_FAQ_BY_NUMBER

    • help:

      Posts an FAQ as an embed on request.

      Either as an normal message or as an reply, if the invoking message was also an reply.

      Deletes invoking message

      Args: faq_numbers (commands.Greedy[int]): minimum one faq number to request, maximum as many as you want seperated by one space (i.e. 14 12 3) as_template (bool, optional): if the resulting faq item should be created via the templated items or from the direct parsed faqs.

    • aliases: post+faq+by+number, post.faq.by.number, post-faq-by-number, postfaqbynumber, faq

    • is hidden: False

    • usage:

      None
      


GiveAwayCog

Description

Short Description

Soon

Config Name

give_away

Cog State Tags

- DOCUMENTATION_MISSING

- FEATURE_MISSING
Commands
  • ABORT_GIVE_AWAY

    • help:

      NOT IMPLEMENTED

    • aliases: abort+give+away, abort-give-away, abort.give.away, abortgiveaway

    • is hidden: True

    • usage:

      None
      

  • CREATE_GIVEAWAY

    • aliases: create.giveaway, giveaway, create+giveaway, creategiveaway, create-giveaway

    • is hidden: True

    • usage:

      None
      

  • FINISH_GIVE_AWAY

    • help:

      NOT IMPLEMENTED

    • aliases: finish+give+away, finish-give-away, finishgiveaway, finish.give.away

    • is hidden: True

    • usage:

      None
      


ImageManipulatorCog

Description

Short Description

Commands that manipulate or generate images.

Config Name

image_manipulation

Cog State Tags

- NEEDS_REFRACTORING

- FEATURE_MISSING

- OPEN_TODOS

+ WORKING
Commands
  • ADD_STAMP

    • help:

      Adds a new stamp image to the available stamps.

      This command needs to have the image as an attachment.

    • aliases: add-stamp, addstamp, add.stamp, add+stamp

    • is hidden: False

    • usage:

      @AntiPetros add_stamp
      

  • AVAILABLE_STAMPS

    • help:

      Posts all available stamps.

    • aliases: available.stamps, available+stamps, availablestamps, available-stamps

    • is hidden: False

    • usage:

      @AntiPetros available_stamps
      


  • MEMBER_AVATAR

    • help:

      Stamps the avatar of a Member with the Antistasi Crest.

      Returns the new stamped avatar as a .PNG image that the Member can save and replace his orginal avatar with.

    • aliases: member.avatar, memberavatar, member-avatar, member+avatar

    • is hidden: False

    • usage:

      @AntiPetros member_avatar
      

  • STAMP_IMAGE

    • help:

      Stamps an image with a small image from the available stamps.

      Usefull for watermarking images.

      Get all available stamps with '@AntiPetros available_stamps'

    • aliases: stamp-image, stamp.image, stampimage, stamp+image

    • is hidden: False

    • usage:

      @AntiPetros stamp_image -si ASLOGO -fp bottom -sp right -so 0.5 -f 0.25
      


KlimBimCog

Description

Short Description

Collection of small commands that either don't fit anywhere else or are just for fun.

Config Name

klim_bim

Cog State Tags

+ WORKING
Commands
  • FLIP_COIN

    • help:

      Simulates a coin flip and posts the result as an image of a Petros Dollar.

    • aliases: flipcoin, flip, flip.coin, flip+coin, flip-coin, coinflip

    • is hidden: False

    • usage:

      @AntiPetros flip_coin
      


  • MAKE_FIGLET

    • help:

      Posts an ASCII Art version of the input text.

      Warning, your invoking message gets deleted!

      Args: text (str): text you want to see as ASCII Art.

    • aliases: make-figlet, make+figlet, make.figlet, makefiglet

    • is hidden: False

    • usage:

      @AntiPetros make_figlet The text to figlet
      


  • SHOW_USER_INFO

    • aliases: show-user-info, show+user+info, showuserinfo, show.user.info

    • is hidden: False

    • usage:

      None
      

  • THE_DRAGON

    • help:

      Posts and awesome ASCII Art Dragon!

    • aliases: the-dragon, the.dragon, the+dragon, thedragon

    • is hidden: False

    • usage:

      @AntiPetros the_dragon
      


  • URBAN_DICTIONARY

    • help:

      Searches Urbandictionary for the search term and post the answer as embed

      Args:

        term (str): the search term
        entries (int, optional): How many UD entries for that term it should post, max is 5. Defaults to 1.
      
    • aliases: urbandictionary, urban+dictionary, urban.dictionary, urban-dictionary

    • is hidden: False

    • usage:

      @AntiPetros urban_dictionary Petros 2
      



PerformanceCog

Description

Short Description

Collects Latency data and memory usage every 10min and posts every 24h a report of the last 24h as graphs.

Config Name

performance

Cog State Tags

- DOCUMENTATION_MISSING

- NEEDS_REFRACTORING

- FEATURE_MISSING

- OPEN_TODOS
Commands
  • GET_COMMAND_STATS

    • aliases: getcommandstats, get+command+stats, get-command-stats, get.command.stats

    • is hidden: True

    • usage:

      None
      

  • REPORT

    • help:

      Reports both current latency and memory usage as Graph.

    • is hidden: True

    • usage:

      @AntiPetros report
      

  • REPORT_LATENCY

    • aliases: report.latency, report-latency, report+latency, reportlatency

    • is hidden: True

    • usage:

      None
      

  • REPORT_MEMORY

    • aliases: reportmemory, report-memory, report.memory, report+memory

    • is hidden: True

    • usage:

      None
      


PurgeMessagesCog

Description

Short Description

Soon

Config Name

purge_messages

Cog State Tags

- DOCUMENTATION_MISSING

- FEATURE_MISSING
Commands
  • PURGE_ANTIPETROS

    • aliases: purgeantipetros, purge+antipetros, purge-antipetros, purge.antipetros

    • is hidden: True

    • usage:

      None
      


SaveSuggestionCog

Description

Short Description

Provides functionality for each Antistasi Team to save suggestions by reacting with emojis.

Config Name

save_suggestion

Cog State Tags

- DOCUMENTATION_MISSING

- NEEDS_REFRACTORING

- FEATURE_MISSING

- UNTESTED

- OPEN_TODOS

+ WORKING
Commands
  • AUTO_ACCEPT_SUGGESTIONS

    • is hidden: True

    • usage:

      None
      

  • CLEAR_ALL_SUGGESTIONS

    • is hidden: True

    • usage:

      None
      

  • GET_ALL_SUGGESTIONS

    • is hidden: True

    • usage:

      None
      

  • MARK_DISCUSSED

    • is hidden: True

    • usage:

      None
      

  • REMOVE_ALL_USERDATA

    • is hidden: True

    • usage:

      None
      

  • REQUEST_MY_DATA

    • is hidden: True

    • usage:

      None
      

  • UNSAVE_SUGGESTION

    • is hidden: True

    • usage:

      None
      


SubscriptionCog

Description

Short Description

Soon

Config Name

subscription

Cog State Tags

- DOCUMENTATION_MISSING

- FEATURE_MISSING
Commands
  • CREATE_SUBSCRIPTION_CHANNEL

    • aliases: createsubscriptionchannel, create+subscription+channel, create.subscription.channel, create-subscription-channel

    • is hidden: True

    • usage:

      None
      

  • NEW_TOPIC

    • aliases: new+topic, new.topic, new-topic, newtopic

    • is hidden: True

    • usage:

      None
      


TemplateCheckerCog

Description

Short Description

soon

Config Name

template_checker

Cog State Tags

- EMPTY

- DOCUMENTATION_MISSING

- CRASHING

- OUTDATED

- FEATURE_MISSING

- UNTESTED
Commands
  • CHECK_TEMPLATE

    • help:

      Checks all Classnames inside a provided template.

      Needs to have the tempalte as attachment to the invoking message.

      Returns the list of classnames it can't find in the config along with possible correction.

      Returns also a corrected version of the template file.

      Args: all_items_file (bool, optional): if it should also provide a file that lists all used classes. Defaults to True. case_insensitive (bool, optional): if it should check Case insentive. Defaults to False.

    • aliases: checktemplate, check.template, check-template, check+template

    • is hidden: False

    • usage:

      None
      


TranslateCog

Description

Short Description

Collection of commands that help in translating text to different Languages.

Config Name

translate

Cog State Tags

+ WORKING
Commands
  • AVAILABLE_LANGUAGES

    • aliases: available.languages, available-languages, availablelanguages, available+languages

    • is hidden: False

    • usage:

      None
      

  • TRANSLATE

    • help:

      Translates text into multiple different languages.

      Tries to auto-guess input language.

      Warning, your invoking message gets deleted!

      Args: text_to_translate (str): the text to translate, quotes are optional to_language_id (Optional[LanguageConverter], optional): either can be the name of the language or an language code (iso639-1 language codes). Defaults to "english".

    • is hidden: False

    • usage:

      @AntiPetros translate german This is the Sentence to translate
      




Dependencies

Developed with Python Version 3.9.1

Python dependencies

  • Jinja2 2.11.2

  • Pillow 8.1.2

  • WeasyPrint 52.2

  • aiohttp 3.7.3

  • aiosqlite 0.16.1

  • antistasi_template_checker 0.1.1

  • arrow 0.17.0

  • async_property 0.2.1

  • asyncstdlib 3.9.0

  • beautifulsoup4 4.9.3

  • click 7.1.2

  • cryptography 3.3.1

  • dateparser 1.0.0

  • discord-flags 2.1.1

  • dpytest 0.0.22

  • emoji 1.1.0

  • fuzzywuzzy 0.18.0

  • gidappdata 0.1.13

  • gidconfig 0.1.16

  • gidlogger 0.1.9

  • googletrans 4.0.0rc1

  • humanize 3.2.0

  • icecream 2.0.0

  • marshmallow 3.10.0

  • matplotlib 3.3.3

  • psutil 5.8.0

  • pyfiglet 0.8.post1

  • python_a2s 1.3.0

  • python_dotenv 0.15.0

  • pytz 2020.5

  • rich 9.13.0

  • tldextract 3.1.0

  • watchgod 0.6

  • webdavclient3 3.14.5

External dependencies

  • Cairo

    • Windows follow these instructions https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer

    • Unix sudo apt-get install -y libcairo2-dev

  • Pango

    • Windows Follow this https://github.com/ImageMagick/pango

    • Unix sudo apt-get install -y libsdl-pango-dev


License

MIT


Development

Future Plans


See also

Links

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-1.1.2.tar.gz (15.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

antipetros_discordbot-1.1.2-py2.py3-none-any.whl (15.9 MB view details)

Uploaded Python 2Python 3

File details

Details for the file antipetros_discordbot-1.1.2.tar.gz.

File metadata

  • Download URL: antipetros_discordbot-1.1.2.tar.gz
  • Upload date:
  • Size: 15.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.25.1

File hashes

Hashes for antipetros_discordbot-1.1.2.tar.gz
Algorithm Hash digest
SHA256 dba99ad262ef232ac646f6860242e09b2bb26a17dd03a6c7c14773b21d2464c0
MD5 28cc20121af60a34626dd6afa94b0732
BLAKE2b-256 9f8ed24bf39dad3f451a10ba0475617414abe915667c6f306b1b15c508561ad5

See more details on using hashes here.

File details

Details for the file antipetros_discordbot-1.1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for antipetros_discordbot-1.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fd104acc604cdf9c0cfa31cd8791f24a987f3990ed4cafae167e94725fada55c
MD5 8567a3712eeb3771d9877856728a68f1
BLAKE2b-256 2f3f6f0b6ec05f5415f99248d56c77e6e83533f001f50bba97644e9956284165

See more details on using hashes here.

Supported by

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