dogegarden / dogehouse.js Goto Github PK
View Code? Open in Web Editor NEWClient-side implementation of DogeHouse API.
License: Mozilla Public License 2.0
Client-side implementation of DogeHouse API.
License: Mozilla Public License 2.0
Wouldn't it be better to create an event class, with all its parameters instead of a property, like it now is.
I would think that it would help a lot especially with things like
I would be open to code this up as well.
when I try connecting to the api using the following method:
app.connect(token, refresh).then(async () => {
console.log("logged in");
});
it throws me a lot of type errors, they are pretty much all in the src/util/types/index.d.ts file of the npm package
this is with the 2.0.5 version and the token and refresh are correct.
I'm getting an error on tsconfig on the first line its underlined the { and when i start im getting this error
this._cooldown = options.cooldown ?? defaultChatCooldown;
SyntaxError: Unexpected token '?'
I have used the started code and got the correct credentials however I get the following error:
SyntaxError: Unexpected token 'export'
Also when I run
node -v
I get v14.0.1
Join for news & updates.
https://discord.gg/6jZnwa9y
I can't figure out what is causing this.. I've tried this on my main PC and on CodeSandbox but this error always comes up.
I'm using the exact same code as this example.
And I have made a .env file with my Dogehouse token & refresh token but it all just won't work.
I've installed and used dotenv, but still no luck.
I can log in just fine with the same tokens using previous dogehouse-js v1.
const { Client } = require("dogehouse.js");
const app = new Client();
app
.connect(process.env.DOGEHOUSE_TOKEN, process.env.DOGEHOUSE_REFRESH_TOKEN)
.then(async () => {
console.log("Bot connected.");
console.log(await app.rooms.top); // Log all of your top rooms to console
});
DOGEHOUSE_TOKEN=token
DOGEHOUSE_REFRESH_TOKEN=token
sandbox/node_modules/dogehouse.js/src/Client.js:179
_onMessageOnceQueue = new Map();
^
SyntaxError: Unexpected token =
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/sandbox/node_modules/dogehouse.js/index.js:4:10)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
Any help is greatly appreciated! I really want to upgrade BenBot to dogehouse.js 2.0.1.
We want to add the ability for the bot to be able to create scheduled rooms, manage them, and join them when ready. This will come after the new release due to the sheer volume of code we're writing.
Something like
await app.connect(...).....
app.bot.isMod
I made my bot but I have no idea how to get it on dogehouse also it doesn't have the syntax listed I know it's easy to figure it out but I just need some more clarity on things
I'm just getting the hang of this library, even tho there's no documentation (pls fix)
And I can't seem to figure out how to send emotes. I thought it would be similar to when creating Twitch bots where you just send the name ( in this case surrounded in : ) but that just sends the plain-text ":peepoHappy:"
to join a room, we need the ROOM TOKEN as written in the comments in examples, but I am not able to figure out where to get the same, I looked in the comments and the docs without avail, any help would be great
Change
6. Start example.js
To
6. Start example.js buy running node example.js
Error upon running chat.js in v 2.0 in stagin branch :
SUMMARY : Error: Cannot find module 'dogehouse-js'
Error generated :
node:internal/modules/cjs/loader:927
throw err;
^
Error: Cannot find module 'dogehouse-js'
Require stack:
Have a flag so that it is possible to opt out of telemetry without having to fork the project to remove it.
It would be nice if there was voice support, for stuff like Music Bots.
Here: https://wiki.dogegarden.net/en/dogehousejs/getting-started is bad link to NPM dogehouse.js package. There is https://www.npm.com/package/dogehouse.js instead of https://www.npmjs.com/package/dogehouse.js.
As requested I need to add the ability to add more administrative room methods and properties. These methods and properties will be able to be used assuming the bot account has the appropriate permissions.
Name | Type | Returns | Permission Required |
---|---|---|---|
createRoom | method | New Room Controller | User |
listAll | property (getter) | Room Controller Array | User |
Name | Type | Returns | Permission Required |
---|---|---|---|
leave | method | Previous Room Controller | User |
setPrivate | method | Current Room Controller | Admin |
banUser | method | User Controller, Romm Controller | Mod |
unbanUser | method | User Controller, Room Controller | Mod |
blockUserChat | method | User Controller, Room Controller | Mod |
bannedUsers | property | User Controller Array | Mod |
Name | Returned Data |
---|---|
userBanned | User Controller, Room Controller |
userChatBlocked | User Controller, Room Controller |
If you have any more suggestions please feel free to comment on this issue and I will look into it.
The link provided in the .md file (https://www.npmjs.com/package/dogehouse-js) does not work anymore.
I'm using Dogehouse.JS 2.0.2 and when I try to run the example JS code from the README-
const { Client } = require('dogehouse.js');
const app = new Client();
app.connect(process.env.DOGEHOUSE_TOKEN, process.env.DOGEHOUSE_REFRESH_TOKEN).then(async () => {
console.log('Bot connected!');
console.log(await app.rooms.top); // Log all of your top rooms to console
});
I get the error-
C:\Users\Dell\Desktop\dogehouse_bot\node_modules\dogehouse.js\src\classes\Chat.js:15
this._cooldown = options.cooldown ?? defaultChatCooldown;
^
SyntaxError: Unexpected token '?'
at wrapSafe (internal/modules/cjs/loader.js:1054:16)
at Module._compile (internal/modules/cjs/loader.js:1102:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (C:\Users\Dell\Desktop\Coding Projects\Javascript\dogehouse_bot\node_modules\dogehouse.js\src\Client.js:5:14)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
`dogehouse\node_modules\dogehouse.js\src\index.ts:1
export { Client } from "./Client";
^^^^^^
SyntaxError: Unexpected token 'export'`
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.