Giter Site home page Giter Site logo

stretch07 / msgroom-bot Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 101 KB

Make a bot for windows 96's msgroom. Native support for commands.--This never actually got deleted, just privated

License: GNU Affero General Public License v3.0

JavaScript 100.00%
msgroom windows96

msgroom-bot's Introduction

msgroom-bot

A Javascript library to create a Windows96 MsgRoom bot using Node.js.
Please note that this is NOT the official API for creating MsgRoom bots. The official API is not yet publicly released.

Features

Native command support

Support for command prefixes. Commands trigger a function that the bot handles.

Automatic entity decoding

Your bot receives the decoded HTML entities for conveniance.

Native image support

Coming soon - native image support for your bot.

Installation

Run npm i msgroom-bot and import msgroom-bot into your library. That's it!

Usage

View installation for help on the basics of this library.
Some quick tips and reminders:

  • Do not use strict equality operators when checking if arguments are primitive values that aren't strings. Your code will fail if you do this. Arguments will always be strings.

Contributing

Feel free to open forks and pull requests. Below are some notable contributors.

Lead Developers

Maintainers

msgroom-bot's People

Contributors

stretch07 avatar nandertga avatar kelbazz avatar

Stargazers

 avatar

Watchers

 avatar

msgroom-bot's Issues

multiple functions are not working as intended (wrong use of async)

  • the async keyword does nothing when you don't use any awaits
  • returning this is not something that would be practical on an async function
// this statement would return `bot` (an instance of MsgroomBot)
await await bot.send("hi").send("hi again").then(bot => bot.send("hi once again"))
  • while it is technically speaking possible to make it async by waiting for a message event be sent back with the exact message and userid and all that stuff, is that really what you want? The requests will be sent in the order you sent them, and thus the messages will appear in the same exact order. If a message doesn't send, that means there's:
    • either a server problem, which is very unlikely to happen
      • maybe the user is muted, which doesn't exist afaik, and that wouldn't really work as you could just reconnect with a different name, so it would make more sense to ban a user and thus cause a closed connection
    • or the user has bad internet, in which case socket.io will close the connection eventually
    • in both cases the connection will be closed, which can be handled by throwing an error or something

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.