Giter VIP home page Giter VIP logo

pauljac3-mastodon-bot's Introduction

Hey there! ๐Ÿ‘‹ I'm Joshua, a budding developer who's returning to software development after a hiatus. Before lockdown, I was studying software engineering in university, along with information systems on the side. But I decided to take a detour since remote classes were not giving...

Currently, I'm working as a cybersecurity analyst, with a focus on infrastructure auditing, fixing vulnerabilities, and automating processes. ๐Ÿ’ชโœจ I'm hopeful that I will return to university in the near future.


๐ŸŒฑ I'm currently learning...

  • JS module development and deployment ๐Ÿš€
  • Asynchronous development โณ
  • JSDoc ๐Ÿ“š
  • Other advanced programming concepts ๐Ÿ’ก

๐Ÿ”ญ My future goals are...

  • Grasping advanced programming concepts ๐Ÿ’ช
  • Exploring low-level programming ๐Ÿ”
  • Getting my dream job... ๐Ÿ˜Œ

๐Ÿ“ซ How to reach me...

๐Ÿ˜ณ Pronouns...

they/them or he/him please!

pauljac3-mastodon-bot's People

Contributors

yeenbean avatar

Watchers

 avatar

pauljac3-mastodon-bot's Issues

Create args for manually triggering functions

The idea is to make a few optional arguments to manually trigger functions, then exit once the function finishes its task. This will be useful when the bot is moved to a production server. We can leverage cron to get more precise timing with posts and responses, and it should hopefully reduce overhead since the bot won't be constantly running.

Implement docker support

This is really to resolve the issue with the bot not starting automatically when I upgrade the container it runs in or the host machine. We are tired of pauljac being down!

Remove obsolete script files

The script files located in the project root were previously used to launch the bot. However, these scripts are now considered obsolete. Instead, the command deno task start should be used, as it is a cross-platform solution that replaces the previous scripts.

Bot crashes during heartbeats if social service returns an error

The bot is crashing during heartbeats when a social service returns an unknown error which the bot cannot process. The code needs to be refactored to handle this sort of scenario correctly.

Below is an example of errors I've encountered when this occurs.

    09:45: Heartbeat
error: Uncaught MastoUnexpectedError: The server returned data with an unknown encoding. The server may be down.
    at HttpNativeImpl.<anonymous> (file:///Users/yeen/Library/Caches/deno/npm/registry.npmjs.org/masto/6.1.0/dist/index.js:927:27)
    at Generator.next (<anonymous>)
    at file:///Users/yeen/Library/Caches/deno/npm/registry.npmjs.org/masto/6.1.0/dist/index.js:76:71
    at new Promise (<anonymous>)
    at __awaiter (file:///Users/yeen/Library/Caches/deno/npm/registry.npmjs.org/masto/6.1.0/dist/index.js:72:12)
    at HttpNativeImpl.createError (file:///Users/yeen/Library/Caches/deno/npm/registry.npmjs.org/masto/6.1.0/dist/index.js:923:16)
    at HttpNativeImpl.<anonymous> (file:///Users/yeen/Library/Caches/deno/npm/registry.npmjs.org/masto/6.1.0/dist/index.js:906:34)
    at Generator.next (<anonymous>)
    at fulfilled (file:///Users/yeen/Library/Caches/deno/npm/registry.npmjs.org/masto/6.1.0/dist/index.js:73:58)
    at eventLoopTick (ext:core/01_core.js:183:11)

Time synchronization is ridiculously CPU intensive

come on man stop this nonsense

// Before triggering the heartbeat, we want to synchronize the thread so that the heartbeat starts at the top of the minute.
const now = new Date();
let next: Date;
if (now.getMinutes() == 59) {
if (now.getHours() == 23) {
next = new Date(
now.getFullYear(),
now.getMonth(),
now.getDate(),
0,
0,
0,
0,
);
} else {
next = new Date(
now.getFullYear(),
now.getMonth(),
now.getDate(),
now.getHours() + 1,
0,
0,
0,
);
}
} else {
next = new Date(
now.getFullYear(),
now.getMonth(),
now.getDate(),
now.getHours(),
now.getMinutes() + 1,
0,
0,
);
}

Implement post reply functionality

The bot currently lacks the ability to respond to posts. It is necessary to implement this feature, along with a dedicated file named "reply_file.txt" to store the replies.

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.