@tawan475/bancho.js

0.1.24 • Public • Published

bancho.js

Interact with osu!'s IRC bancho

Installation

npm install @tawan475/bancho.js

Authentication

YOUR IRC ACCOUNT DOES NOT USE THE SAME USERNAME AND PASSWORD AS YOUR OSU ACCOUNT

Get your IRC username and password here

https://osu.ppy.sh/p/irc

Documentation

Github Wiki Link

Example usage

Install bancho.js and dotenv

npm install @tawan475/bancho.js
npm install dotenv

Basic message reciever and Ping Pong command!

require('dotenv').config();
const { banchoClient } = require('@tawan475/bancho.js');
const bancho = new banchoClient();

bancho.once('ready', () => {
    console.log('Connected and logged in to bancho.');
    // Ready to send messages
});

bancho.on('message', (message) => {
    console.log(message.raw);
});

bancho.on('pm', (message) => {
    console.log("pm " + message.raw);
    if (message.content.startsWith("!ping")) {
        message.channel.send("pong!");
    }
});

// Get your IRC username and password here, https://osu.ppy.sh/p/irc
// THIS IS NOT THE SAME WITH YOUR OSU ACCOUNT
bancho.login({
    username: process.env.BANCHO_USERNAME,
    password: process.env.BANCHO_PASSWORD,
});

Package Sidebar

Install

npm i @tawan475/bancho.js

Weekly Downloads

1

Version

0.1.24

License

MIT

Unpacked Size

47.7 kB

Total Files

8

Last publish

Collaborators

  • tawan475