Git Product home page Git Product logo

Comments (2)

Mehoff avatar Mehoff commented on June 12, 2024

For me the problem is even deeper. I have got a weird bot behavior on "leave" command. I have tried writing it by myself, also tried several examples like this official one https://github.com/DSharpPlus/Example-Bots/tree/master/DSPlus.Examples.CSharp.Ex04
The error is always the same:
Bot can join to channel, but on "leave" command he always giving me an answer "Not connected in this guild.", even tho he is ;P https://prnt.sc/stxz1q
I have brazenly copy-pasted code from example above (changed token ofc), but even tho in "Main" cs file 'voice' is defined and not null, inside command 'leave' - VoiceNextConnection is giving me null.
I had never stucked that hard while developing discord bots in node.js.
There cannot be a problem with bot permissions, because I use the same discord bot application with same permissions, that I`ve used before on my node.js bot. I just took the token, and passed it in another project.
Here is some information for people that have a chance to give me a solution to this problem.
DSharpPlus/CommandsNext/Interactivity/VoiceNext/ v3.2.3,
.Net Core 3.1,
Windows 10,
VS 19,

           public VoiceNextClient Voice { get; set; }
...
            var vcfg = new VoiceNextConfiguration
            {
                VoiceApplication = VoiceApplication.Music
            };
            this.Voice = this.Client.UseVoiceNext(vcfg);
            if (vnc == null)
            {
                //VoiceNextConnection is always null
                await ctx.RespondAsync("Not connected in this guild.");
                return;
            }

Thanks for everyone who have read this mess!

from example-bots.

Emzi0767 avatar Emzi0767 commented on June 12, 2024

The solution to this problem is reading the docs.

from example-bots.

Related Issues (6)

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.