Skip to content

First Version of Incorrect Acronym Bot!

Latest
Compare
Choose a tag to compare
@cameronlxu cameronlxu released this 23 Nov 06:51
· 1 commit to main since this release
1509374

The Incorrect Acronym (IA) Bot lives in the subreddit r/IncorrectAcronym. It scans each comment for either words not in the english dictionary or comments that start with !Suggest.

  • For words that are not in words_dictionary.json (the english dictionary) and not in custom_dictionary.json, the IA Bot replies with a comment defining the "acronym". Each letter is matched with a random word in the English dictionary that starts with the same letter.

  • If the word is not in the English dictionary but is in the custom dictionary, the IA Bot prioritizes its own dictionary and will output that definition.

  • For comments that include !Suggest, the IA Bot adds the acronym-definition to its own personal dictionary. The formatting of this is: !Suggest ACRONYM DEFINITION

    • For example: !Suggest TMIP Too Many Imaginary Ponies
  • After either of these actions, the IA Bot adds an encrypted version of the comment ID to the posts_replied_to.json file.

  • While scanning comments, the IA Bot will compare the current comment ID to each decrypted comment ID in the posts_replied_to.json file. If there is a match, the IA Bot will know that it has replied to that comment before and will skip that comment.

    • Additionally if the IA Bot detects that the author of a comment is itself, it will also skip that comment and scan the next one.