Code Monkey home page Code Monkey logo

discord-together's Introduction

Hey , I'm RemyK

NPMDiscord

Hello, I'm RemyK, Rémy for friends. I learned to develop by myself, and it's now a real passion for me. I love learning new things, creating new projects and sharing them with you (100% of my projects are open-source).


Talking about personal stuffs:

  • 👨🏽‍💻 French student
  • 🌱 Developer at his spare time
  • 🎵 Pianist, composer and musician
  • 🍜 Lasagna lover
  • 🔗 Climbing enthusiast (8a)


📈 My Github stats:

shwetangStats

top-langs

NOTE: 'Most Used Languages' does not indicate my skill level or something like that, it's a github metric of which languages i have the most code on github, it's a new feature of github-readme-stats


Languages and Tools

Visual Studio Code HTML5 CSS3



Visitor count


discord-together's People

Contributors

remyk888 avatar srnyx 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

discord-together's Issues

Weird invite

When my bot send invite to yt together send this weird invite
Screenshot
Using latest version from ur package and discord.js
Using node v16

Invalid invite url

const { MessageEmbed } = require("discord.js");

module.exports = {
  name: "chess",
  description: "Make a Chess voice channel.",
  async execute(bot, message) {
    const voice = message.member?.voice;

    if (!voice?.channel)
      return message.channel.send( "❌ You have to join a voice channel first.");

    if (!voice?.channel.viewable)
      return message.channel.send("❌ I need **\`VIEW_CHANNEL\`** permission.");

    const invite = await bot.discordTogether.createTogetherCode(voice.channelID, "chess").catch(console.error);

    const embed = new MessageEmbed()
      .setDescription(`[Click here the invite link to join it.](${invite.code})`)

    return message.channel.send(embed);
  },
};

This code was working fine some days ago. But now I'm getting this link
https://discord.com/invite/50013
I tried with many voice channel , and with all the activities . I'm getting only this link

Please publish to npm

My bot can't run the new activities because you haven't published the updates to npm yet.
Merge #49 before publishing please

Sketch Heads no worky

Sketch Heads doesn't work...

NodeJS V16.13.2
Module V1.3.3

doodle crew works, but tells you to go to sketch heads, and sketch heads just doesn't work...

Endpoint Docs

Hey!

I looove your project and want to get the link of the docs for the API Endpoint of this function. This is due to I want to research more on this topic and hopefully, contribute to the project!

Version 13

How can we use it with discord.js v13. It is not working🥴
Please support

DeprecationWarning messageCreate

After I start the bot and I send a text message in any channel. I get this error.

(node:9360) DeprecationWarning: The message event is deprecated. Use messageCreate instead (Use node --trace-deprecation ...to show where the warning was created)

New Activity: Checkers in the Park

About an hour ago, Discord put out a new "Checkers in the Park" activity similar to the existing "Chess in the Park." I believe I have retrieved the activity's ID, so it can now be added to this package.

Activity ID: 832013003968348200

UnhandledPromiseRejectionWarning: Error: An error occured while starting Youtube together !


I have been getting this error for a few days without having touched any of the code. "UnhandledPromiseRejectionWarning: Error: An error occured while starting Youtube together !"


  • Information:
  1. Error: UnhandledPromiseRejectionWarning: Error: An error occured while starting Youtube together !
  2. Node Version: 14.17.3
  3. DiscordTogether Version: ^1.1.14

(node:3781) UnhandledPromiseRejectionWarning: Error: An error occured while starting Youtube together ! at DiscordTogether.createTogetherCode (/home/runner/Zanix-Bot/node_modules/discord-together/src/DiscordTogether.js:95:23) at runMicrotasks (<anonymous>) at processTicksAndRejections (internal/process/task_queues.js:95:5) (Use node --trace-warnings ...to show where the warning was created) (node:3781) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:3781) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

The client is not necesary as a param

I don't know whether to classify this as unexpected behavior or as a error in the documentation, or even if you were already aware of this behavior.

I think it is unnecessary to initialize the constructor with the discord js client, when discord-together only needs the bot token for the post request.

The way I do it:

const { DiscordTogether } = require('discord-together');

const discordTogether = new DiscordTogether({ token: process.env.DISCORD_TOKEN });

Using command handling or event handling is simpler for me to create it this way, so I avoid having discord code together outside of the command I use it in.

Didn't start

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • [yes ] I am running the latest version
  • [ yes] I checked the documentation and found no answer
  • [ yes] I checked to make sure that this issue has not already been filed
  • [ yes] I'm reporting the issue to the correct repository (for multi-repository projects)

Expected behavior

it should start the activity

Current behavior

dont do anytthing

Failure Information (for bugs)

idk

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

image

when i click the start it wont do anything

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Operating system: win 10
  • Discord-together version: 1.3.31
  • Node version: 18.17
  • NPM version: 9.8.1

Failure Logs

no logs

Application ID?

Is the youtube and youtube dev old Youtube Together or new one branded as "Watch Together"?
If you could, can you provide it both if missing?
Ty for it.

New activities

Discord just added three new games:

  • Doodle Crew
  • Letter Tile
  • Word Snacks

It would be great if their IDs can be added

TypeError: option.toLowerCase is not a function

if (option && this.applications[option.toLowerCase()]) {
let applicationID = this.applications[option.toLowerCase()];

should be

if (option && this.applications[option.toString().toLowerCase()]) {
let applicationID = this.applications[option.toString().toLowerCase()];

otherwise it throws this error "(node:10996) UnhandledPromiseRejectionWarning: TypeError: option.toLowerCase is not a function"

for reference, this is lines 71 and 72 in the DiscordTogether.js file, and the fix was to make it a string

Check if all users left an Activity

Hey, how do I make the bot do something when ALL users left it? (If no one is in it)

If this is not possible, are there any alternatives?

more like a question rather than an issue

so is there anyway yet to:

i) enable fullscreen. not the discord's fullscreen but youtube's itself. it says full screen unavailable. May be some sorta user script to bypass it?

ii) i dont think this is available yet but how to give access to only selected person to control and make other able to view only.

ii) Is there a way to keep the yt together going on even though I leave the VC so than i could continue it later. May be adding a bot to the activity so the activity goes on or sth else.

iv) add playlist instead of a video one by one

I know most of these are not directly possible so I am asking for some workaround methods which can help upto some extent.

Thank you.

youtube dont work?

if (message.content.toLowerCase() === 'playYT') {
if(message.member.voice.channel) {
client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'youtubeDev').then(async invite => {
return message.channel.send(${invite.code});
});
};
};

when sending playYT command the bot dont reply and there is no error and other games work fine i also tried normal youtube and also didnt work

Please fix the Sketchheads activity.

My bot can't recognize the Sketchheads activity since its the only one that doesn't work.
and also, Discord just shut down Doodle Crew.
Code Sample:

client.on('messageCreate', async message => {
  if (message.content === '+gametest') {
      if(message.member.voice.channel) {
   client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'sketchheads').then(async invite => {
    return message.channel.send(`${invite.code}`);
});

Terminal Error:
      throw new SyntaxError('Invalid option !');
            ^

SyntaxError: Invalid option !

Type definition error?

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • [ * ] I am running the latest version
  • [ * ] I checked the documentation and found no answer
  • [ * ] I checked to make sure that this issue has not already been filed
  • [ * ] I'm reporting the issue to the correct repository (for multi-repository projects)

Expected behavior

Please describe the behavior you are expecting
Code can successfully be compiled to JavaScript

Current behavior

What is the current behavior?
Console output these information:

Client.ts:52:50 - error TS2345: Argument of type 'this' is not assignable to parameter of type 'Client<boolean>'.
  Type 'MyClient' is missing the following properties from type 'Client<boolean>': presence, sweepers

52     public DiscordTogether = new DiscordTogether(this, {
                                                    ~~~~

I'm sure that my MyClient class is extend from Client class of discord.js

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Run code I wrote

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Operating system: Ubuntu (But in docker container)
  • Gdd.js version: Idk what is that
  • Node version:16.6.0
  • NPM version: I didn't check it
  • Discord.js version: 13.1.0

Failure Logs

Already include above

Error

Doesn't make an invite URL and leaves an error in the console

heres my code:

const Discord = require('discord.js')
require("discord-reply")
const bot = new Discord.Client();

module.exports = {
    name: "youtube",
    cooldown: 3,
    description: "Check the version of the bot",
    aliases: ["yt", "youtube_together", "youtubetogether"],
    execute(msg){
        const Discord = require('discord.js');
        const { colour } = require('../config.json')
        const { DiscordTogether } = require('discord-together');
        
        bot.discordTogether = new DiscordTogether(bot);

        if(!msg.member.voice.channel) return msg.lineReply("You need to be in a `Voice Channel` for this command")

        if(msg.member.voice.channel) {
            bot.discordTogether.createTogetherCode(msg.member.voice.channelID, 'poker').then(async invite => {
                const ytEmbed = new Discord.MessageEmbed()
                    .setColor(colour)
                    .setTitle('__Youtube__')
                    .setDescription(`${invite.code}`)
                    .setTimestamp()
                return msg.lineReply(`${ytEmbed}`);
            })
        } else {
            msg.lineReply("Sorry I could not start that activity")
        }
    }
}

image

New Activities

879864070101172255 sketchyartist
832012854282158180 putts
763133495793942528 pokerdev
878067427668275241 doodlecrewdev
879864010126786570 wordsnackdev
879864104980979792 sketchyartistdev
891001866073296967 decodersdev
832012586023256104 CG 2 Dev
832012682520428625 CG 3 Dev
832013108234289153 CG 4 Dev

image

IDs are from Inspector Tool (Ctrl + Shift + I)
activity-popout-{ID}
image

Error: An error occured while starting Youtube together !

Error: An error occured while starting Youtube together !
at DiscordTogether.createTogetherCode (/home/runner/sssAFASssX4UV4ssssSFASFAssss/node_modules/discord-together/src/DiscordTogether.js:98:31)
at processTicksAndRejections (internal/process/task_queues.js:93:5)

NOTE : old version is running with me

Screenshot 2021-05-09 215326

Blocking a user from using youtube.

Is it possible to block someone from using the youtube GUI? I mean, i want to let him see the videos but not touch the queue, video settings etc.

Invite link expired

When I try to make an invite, this happens.
image

client.on('message', message => {
    if (message.content === '*youtube') {
        client.discordTogether.createTogetherCode(message.member.voice.channelID, 'youtube').then(async invite => {
            message.channel.send(`Click the link! https://discord.gg/${invite.code.replace('https://discord.com/invite/', '')}`);
            message.channel.send(`${invite.code}`);
        });
    };
})```

Question

isn't this against discord ToS?

Just making sure lol.

Code example not working

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • I am running the latest version
    Not applicable
  • I checked the documentation and found no answer
    Not applicable
  • I checked to make sure that this issue has not already been filed
    Not aplicable
  • I'm reporting the issue to the correct repository (for multi-repository projects)

Expected behavior

Please describe the behavior you are expecting
I expect your code example to work.

Current behavior

What is the current behavior?
It wont work

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Create Discord bot, in main file copy and paste in main file the example
  2. Install all dependancies
  3. Run main file

Context

In Discord.JS 13, messageCreate replaces message event, so I assume your example is for Discord.JS 13. You need to declare Client intents, else, it wont work

no starting youtube together

  • Operating system:
  • discord.js version: 13
  • Node version: 16

Error: An error occured while starting Youtube together !
at DiscordTogether.createTogetherCode (/home/pi/panais2/node_modules/discord -together/src/DiscordTogether.js:105:15)

3 games do not work

      {
        label: "Awkword",
        description: "Creates a Awkword activity invite",
        value: "awkword",
        emoji: "🎨",
      },
      {
        label: "Puttparty",
        description: "Creates a Puttparty activity invite",
        value: "puttparty",
        emoji: "🎨",
      },
      {
        label: "Sketch Heads",
        description: "Creates a Sketch Heads activity invite",
        value: "sketchheads",
        emoji: "🎨",
      },

version 1.3.25

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.