Code Monkey home page Code Monkey logo

playstationbot's Introduction

playstationbot

A Discord bot which posts official news relating to Playstation.

playstationbot's People

Contributors

gmlyth avatar

Watchers

 avatar

playstationbot's Issues

Get running on ECS

After creating a working Docker version, get Docker container running on ECS.

Gather additional post attributes.

After gathering the post link, go to the post and get the title, tags, published date, and modified date. Keep this in the item, and store it on dynamodb.

See below example. NOTE: if there are multiple tags, it just appears an an additional element.

  |   |   |

Tag Subscription

Allow users to toggle subscriptions to tags with /subscribetag TAGNAME.

Also allow users to do /listtagssubscribed.

THis will be saved in DynamoDb - user_id as partition, tag_name as range, guild_id as additional attribute.

Tag tracking

-For each post read, save the tag (and date seen) to dynamodb.
-If a tag has already been seen, but a published date is newer than its seen date, update the tag.
-Preload tags from dynamodb.

-Add a slash command to list tags. This will send an @ to the user who requested it.

Create better cache.

Currently the cache is a HashMap. This allows O(1) lookup to check for an existing post in memory. That's great! What's not great is, if we want to expire old blog posts. I see no reason to keep more than 100 in memory, to help keep the memory requirements down.

Create a cache data structure that has both a LinkedList and a HashMap. Inserting will potentially be O(n) (but this is HIGHLY unlikely) because it will search for the best place to put a record, but it will almost always be going on the end of the list.

After performing an insert, if the size of the cache is over 100, the item from the beginning of the list (which will be the oldest) will be removed.

tolower() on Tags

Tags sometimes are capitalized. Do a data cleanup to lower existing tags, then make sure any parsed from blog posts will be lowered.

Design guild settings table

Create dynamodb table to hold guild settings. For now it will just hold the name of the channel to post links in as well as an array of emojis to randomly use.

Use credentials chain

Currently I have to manually change lines of code for whether to use default credential provider, environment variables, or ECS container creds - and the last one doesn't even work! There has to be a way to set the credential chain to be used without needing manual hard coding. This isn't necessary in boto3, so I'm sure there's some solution to it in java.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.