All Projects → ThePooN → bancho.js

ThePooN / bancho.js

Licence: GPL-3.0 License
Interface with Bancho over IRC, made easy and reliable.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to bancho.js

CloudBot
CloudBot - The simple, fast, expandable, open-source Python IRC Bot!
Stars: ✭ 57 (+21.28%)
Mutual labels:  irc
st2chatops
Packaging environment for building StackStorm chatops native packages
Stars: ✭ 26 (-44.68%)
Mutual labels:  irc
twitch-chatlog
Fetch the chatlog to a twitch VOD from your command line.
Stars: ✭ 78 (+65.96%)
Mutual labels:  irc
twitchchat
interface to the irc portion of Twitch's chat
Stars: ✭ 80 (+70.21%)
Mutual labels:  irc
teleirc
Go implementation of a Telegram <=> IRC bridge for use with any IRC channel and Telegram group
Stars: ✭ 112 (+138.3%)
Mutual labels:  irc
irc.dart
Dart IRC Library
Stars: ✭ 45 (-4.26%)
Mutual labels:  irc
PyBorg
Fork of PyBorg AI bot for cutie578 on EFNet
Stars: ✭ 45 (-4.26%)
Mutual labels:  irc
irc-go
Libraries to help with IRC development in Go.
Stars: ✭ 22 (-53.19%)
Mutual labels:  irc
erk
Ərk is an open source, cross-platform IRC client written in Python 3, Qt 5, and Twisted.
Stars: ✭ 21 (-55.32%)
Mutual labels:  irc
yesbot
IRC Bot Written in Prolog
Stars: ✭ 19 (-59.57%)
Mutual labels:  irc
energymech
EnergyMech IRC Bot
Stars: ✭ 24 (-48.94%)
Mutual labels:  irc
irc-tts
Broadcast your IRC channel via a text-to-speech webserver
Stars: ✭ 14 (-70.21%)
Mutual labels:  irc
bmotion
An Artificial Stupidity script for eggdrop bots
Stars: ✭ 58 (+23.4%)
Mutual labels:  irc
Osmo
Osmo is a tool to create, edit and manage your osu! skins with ease.
Stars: ✭ 18 (-61.7%)
Mutual labels:  osu
plumeria
🤖 A Discord chat bot with rich data piping between commands
Stars: ✭ 35 (-25.53%)
Mutual labels:  osu
Osuplay
リズムゲーム「osu!」の譜面に使用されている楽曲を一覧表示して、再生できるソフトウェアです。
Stars: ✭ 19 (-59.57%)
Mutual labels:  osu
thelounge-deb
📦 ‎ Debian/Ubuntu package for The Lounge
Stars: ✭ 16 (-65.96%)
Mutual labels:  irc
guweb
The frontend appearance for the osu! server protocol, gulag! 🧶
Stars: ✭ 20 (-57.45%)
Mutual labels:  osu
lita-irc
An IRC adapter for Lita.
Stars: ✭ 19 (-59.57%)
Mutual labels:  irc
limnoria-plugins
Limnoria plugins I wrote or forked.
Stars: ✭ 35 (-25.53%)
Mutual labels:  irc

bancho.js

NPM
pipeline status

Current release: v0.10.0-rc.6

Introduction

bancho.js is designed to be the best library when it comes to interacting with Bancho in real-time. It connects over its IRC interface and enables you to do anything Bancho enables you to do, from chatting to managing multiplayer lobbies!

It is designed to be reliable and easy to use, as demonstrated by the many projects relying on it!

Useful Links

Disclaimer

Before running a bot on your osu! account, please read the Bot account wiki page. It details conditions under which you can run a bot on your account and eventually getting a dedicated account for it.

Please do NOT create an account dedicated to your bot without allowance. This will be considered multi-accounting, which is against the osu! Terms of Use and may lead to sanctions on your account.

The library uses sane rate limits for normal user accounts by default.

Getting Started

First, install the library: npm i bancho.js.

Let's get straight into it with a working example. This will print all your incoming PMs to the console:

const Banchojs = require("bancho.js");
const client = new Banchojs.BanchoClient({ username: "ThePooN", password: "your_irc_password" });
client.connect().then(() => {
	console.log("We're online! Now listening for incoming messages.");
	client.on("PM", (message) => console.log(`${message.user.ircUsername}: ${message.message}`));
}).catch(console.error);

Output:

Ghouru: notice me senpai

All you need to do to run this example is install bancho.js into your project (npm i bancho.js), paste this code into a file and replace my credentials with yours, from https://osu.ppy.sh/p/irc.
This library doesn't limit itself to sending messages though! It also has complete multiplayer support and the ability of firing API requests from BanchoUser objects, and much more! Learn more with the provided examples and documentation!

Caching

A BanchoClient uses unique BanchoUser instances across its lifespan. The cache never gets cleared and objects never destroyed.

Starting with bancho.js v0.10, we support garbage collection of these instances out-of-the-box using WeakRef, introduced in Node.js >= v14.6.0.

bancho.js also supports weak-value-map if present, providing garbage collection of BanchoUser objects in Node.js >= v10.0.0. From my own testing, this solution offers better memory usage than Node.js's WeakRef. However, I don't think this can be considered as stable as Node.js's WeakRefs, so I wouldn't recommend using this solution unless necessary.

Contributing

This library is very near completion. Thanks to everyone who supported and are now (directly or not) using the project!
There must still be some improvements to be done though. Feel free to hop on my Discord server so we can figure out issues and improve the code!
You can financially support this project by subscribing to my Twitch channel or donating.

Compatibility

bancho.js supports all currently supported Node.js releases. See Node's LTS schedule.

License

It is licensed as GPL 3.0. The entire license text is available in the LICENSE file, however I recommend you to take a look at this short summary to get a better idea!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].