GithubHelp home page GithubHelp logo

sudhanplayz / discordjs-activity Goto Github PK

View Code? Open in Web Editor NEW
61.0 61.0 15.0 48 KB

An simple package to create an Activity in Discord Voice Channel using Discord.js

Home Page: https://www.npmjs.com/package/discordjs-activity

License: MIT License

JavaScript 100.00%
activity discord discordjs npm package

discordjs-activity's Introduction

Hi there ๐Ÿ‘‹

I'm Sudhan, An developer from somewhere in the earth. I like to code web applications and games. I have worked on many projects in my past, Some of my open source projects are pinned below make sure to check them out.

My skill set encompasses a breadth of technologies, including TypeScript, JavaScript, API development, both Backend and Frontend proficiency, and a holistic command of Full Stack development. I leverage Prisma and Express for robust backend architecture, while employing Next.js with TypeScript for Full Stack applications and Node.js for backend implementations. Additionally, my expertise extends to the intricate domains of Discord bot development, Blockchain, Web3, and DApps, reflecting a commitment to staying at the forefront of technological advancements.

Thanks for visiting my github profile. Have a great day ahead!~

โœจ About Me โœจ

const Sudhan = {
    FavouriteLanguage: "Javascript/Typescript",
    OpenedIssues: 82,
    OpenedPullRequests: 87,
    TotalCommits: 15975,
    Stars: 1895,
    Repositories: {
       Created: 227,
       Contributed: 13
    },
}; //I'm a Epic Object, UwU

๐Ÿš€ My Stats ๐Ÿš€

Even more stats

Last updated on 4th July 2024 using magic โœจ

discordjs-activity's People

Contributors

darrenofficial avatar itzmiracleowo avatar leoodz avatar lightningbolt62 avatar ramazansancar avatar renovate-bot avatar reyansh-khobragade avatar sudhanplayz avatar themystiq avatar xaronnn 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

Watchers

 avatar  avatar  avatar

discordjs-activity's Issues

VoiceChannel.activityInvite is not a function

this is the error im getting running the code.
UnhandledPromiseRejectionWarning: TypeError: VoiceChannel.activityInvite is not a function

my code :

const { Client } = require("discord.js")
const client = new Client()
require('discordjs-activity')(client)
client.on("message", async (message) => {
    if(message.author.bot)return
    if(message.content === "youtube"){
        let VoiceChannel = client.channels.cache.get("857222096191094804")//Voice Channel ID
        let Invite = await VoiceChannel.activityInvite("755600276941176913")//Application ID
        //For more application IDs you can check ReadMe
        message.channel.send("https://discord.com/invite/"+Invite.code)
    }
    if(message.content === "poker"){
        let VoiceChannel = message.member.voice.channelID//Voice Channel ID
        let Invite = await VoiceChannel.activityInvite("755827207812677713")//Application ID
        //For more application IDs you can check ReadMe
        message.channel.send("https://discord.com/invite/"+Invite.code)
    }
    if(message.content === "betrayal"){
        let VoiceChannel = message.member.voice.channelID//Voice Channel ID
        let Invite = await VoiceChannel.activityInvite("773336526917861400")//Application ID
        //For more application IDs you can check ReadMe
        message.channel.send("https://discord.com/invite/"+Invite.code)
    }
    if(message.content === "fishing"){
        let VoiceChannel = message.member.voice.channelID//Voice Channel ID
        let Invite = await VoiceChannel.activityInvite("814288819477020702")//Application ID
        //For more application IDs you can check ReadMe
        message.channel.send("https://discord.com/invite/"+Invite.code)
    }
})

client.login('mytokenhehe')

TypeError: VoiceChannel.activityInvite is not a function

hello i was trying to add commands to the bot (i use my command handler). But I get the error:
TypeError: VoiceChannel.activityInvite is not a function
Here is my code (I have Discord.js v13):

require("discordjs-activity");

const Command = require("../Structures/Command");

module.exports = new Command({
    name: "activities",
    description: "Voice minigames command",
    cooldown: 10,
    permissions: ["SEND_MESSAGES"],
    async run(message, args, client){
        
        const voice = args[0];
        const game = args[1];

        try {
            if(game === 'youtube'){
                let VoiceChannel = client.channels.cache.get(voice)
                let Invite = await VoiceChannel.activityInvite("youtube_together")
                if(Invite) {
                    message.reply("https://discord.com/invite/"+Invite.code)
                }
            }
        } catch (error) {
            console.log(error)
        }
    }
});

How can i fix this?

TypeError: require(...) is not a function

Can you explain how we can to that but in two separate line:

  • Import the module
  • Add the client to the module

require("discordjs-activity")(client)
^
TypeError: require(...) is not a function

Node: v16.6
Npm: v7.30

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/npm-publish.yml
  • actions/checkout v2
  • actions/setup-node v2
npm
package.json
  • discord.js 12.5.3

  • Check this box to trigger a request for Renovate to run again on this repository

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.