thepoon / bancho.js Goto Github PK
View Code? Open in Web Editor NEWInterface with Bancho over IRC, made easy and reliable.
Home Page: https://bancho.js.org
License: GNU General Public License v3.0
Interface with Bancho over IRC, made easy and reliable.
Home Page: https://bancho.js.org
License: GNU General Public License v3.0
Bonjour(ou bonsoir) je voudrais de l'aide pour accéder au beatmap osu! car je voulais faire un random map request. J'ai fait une clé api si besoin. du coup pour savoir comment l'inclure voici mon code
const Banchojs = require("bancho.js");
const USERNAME = "username"
const PASSWORD = "IRC password"
const API = "api key"
const client = new Banchojs.BanchoClient({
username: USERNAME,
password: PASSWORD
});
const prefix = "!";
const startOsuBot = async () => {
try {
await client.connect();
console.log("osu!Bancho Connected...");
client.on("PM", async ({ message, user }) => {
//Check if message was sent by ourselves
if (user.ircUsername === USERNAME) return;
//Check for message prefix
if (message[0] !== "!") return;
const command = message.split(" ")[0].toLowerCase();
switch (command) {
case prefix + "help":
return await user.sendMessage(`All command are in [https://github.com/Bibou1494/BibouOsu-Bancho-Bot GitHub]`);
});
} catch (err) {
console.error(err);
}
};
startOsuBot();
Merci en avance.
Au revoir.
getUserById() doesn't return a valid class
I'm not sure if this is easily fixable since it's dependent on nodesu
but it would be nice :)
TypeError: bancho.banchoClient.getUserById(...).sendMessage is not a function
I'm using this workaround for now
let o = await bancho.banchoClient.getUserById(19012828);
bancho.banchoClient.getUser(o.ircUsername).sendMessage("Yo");
idk where else to put this, but ur documentation (https://bancho.js.org/) has been down since 0.10.1 release
i noticed it immediately, but i was just using the source code anyways, assuming you'd put it back up.
but now I assume you've forgotten, so now I'm just letting you know
Looks like this afternoon, either osu's dns servers were down, or hetzner cloud had connection issues. As a result, this happened :
events.js:174
throw er; // Unhandled 'error' event
^
Error: getaddrinfo EAI_AGAIN osu.ppy.sh osu.ppy.sh:443
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26) Emitted 'error' event at:
at TLSSocket.socketErrorListener (_http_client.js:401:9)
at TLSSocket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
I'm not really sure how to handle it?
Lobby size is limited to 15, when it should be limited to 16.
bancho.js/lib/Multiplayer/BanchoLobby.js
Line 580 in ab3f14f
An exception is thrown but bancho accepts the command just fine when you type it in manually. Sorry for making an issue on github for a 1-character fix, discord doesn't like my IP :(
(IF NEED MORE CONTEXT THAN BELOW, REPLY)
I was creating a new project with ur latest bancho.js module, and for several hours I thought I was going crazy. Simple methods were not working (BanchoLobby.closeLobby(), the beatmap property under BanchoLobby). I was freaking out because I've ended up using the exact same methods under my older projects (that also used Bancho.js), and they are still working.
And after several hours of freaking out, I decided to copypaste code (just simple execution tests on several things) from a 0.10.0 project to 0.9.7, and am convinced that ur new version is potentially broken.
OLD VERSION(no problems): 0.9.7
NEW VERSION (with many problems on my end): 0.10.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.