GithubHelp home page GithubHelp logo

dogegarden / dogehouse.js Goto Github PK

View Code? Open in Web Editor NEW
101.0 101.0 20.0 161 KB

Client-side implementation of DogeHouse API.

License: Mozilla Public License 2.0

TypeScript 28.65% JavaScript 71.35%
dogehouse

dogehouse.js's People

Contributors

anirudh242 avatar boorah avatar holopanio avatar honbradev avatar jackcrispy avatar mudrank avatar okdargy avatar samarmohan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dogehouse.js's Issues

Wouldn't it be better to create an Event class?

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

  • auto-complete
  • less errors (typo checking)
  • etc.

I would be open to code this up as well.

type-errors on connect

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.

tsconfig

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 '?'

SyntaxError: Unexpected token =

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.

index.js

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
  });

.env

DOGEHOUSE_TOKEN=token
DOGEHOUSE_REFRESH_TOKEN=token

Error

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.

Add Scheduled room support

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.

Instructions unclear

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

Custom emotes don't seem to work

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:"

how to get the room token in dogehouse

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

Missing dogehouse-js in staging branch (examples/chat.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:

  • /Users/krishnaramasimha/Downloads/dogehouse.js-staging/examples/chat.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:924:15)
    at Function.Module._load (node:internal/modules/cjs/loader:769:27)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object. (/Users/krishnaramasimha/Downloads/dogehouse.js-staging/examples/chat.js:6:21)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/Users/krishnaramasimha/Downloads/dogehouse.js-staging/examples/chat.js'
    ]
    }

@HoloPanio @JackCrispy ?

Opt out of telemetry

Have a flag so that it is possible to opt out of telemetry without having to fork the project to remove it.

Voice Support?

It would be nice if there was voice support, for stuff like Music Bots.

Adding more administrative room methods & properties

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.

Room Class

Name Type Returns Permission Required
createRoom method New Room Controller User
listAll property (getter) Room Controller Array User

Room Controller Class

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

Room Events

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.

Unexpected token '?'

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)

Unexpected token 'export'

`dogehouse\node_modules\dogehouse.js\src\index.ts:1
export { Client } from "./Client";
^^^^^^

SyntaxError: Unexpected token 'export'`

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.