Git Product home page Git Product logo

Comments (13)

Yucked avatar Yucked commented on August 20, 2024 2

@DesmondANIMUS
This is a Discord bot and I believe there is no Microsoft Bot FX required.

This is the library that the bot is built upon: https://github.com/NaamloosDT/DSharpPlus

Documentation: https://dsharpplus.emzi0767.com

from modcore.

gaurav-gogia avatar gaurav-gogia commented on August 20, 2024

Are you using microsoft bot framework? What are the things I should be aware of before I can begin? I'm kinda new to bots but would like to try and get better.

from modcore.

Vetsoo avatar Vetsoo commented on August 20, 2024

Hey, when I pull the solution and build it, I get these errors: "Unable to find package DSharpPlus.CommandsNext with version (>= 3.1.3-beta-00273)"

Any idea?

Edit: Found out you I needed to add the nightly builds myget source: https://www.myget.org/F/dsharpplus-nightly/api/v3/index.json

It is working now!

from modcore.

Vetsoo avatar Vetsoo commented on August 20, 2024

Could you give some more information on how to test this bot?

from modcore.

uwx avatar uwx commented on August 20, 2024

To get the NuGet packages, simply use dotnet restore -s https://www.myget.org/F/dsharpplus-nightly/api/v3/index.json in the project root.

If you run the bot with no arguments it'll create a settings.json file with sample data, then you replace the token with a Discord bot token. Follow the instructions on the application page and on this handy page to add your instance of the bot to your own guild, and then use +help to show available commands.

from modcore.

Vetsoo avatar Vetsoo commented on August 20, 2024

I get a nullreference when I start up on this line t.Namespace.StartsWith("ModCore") in the AsyncListenerHandler

from modcore.

Naamloos avatar Naamloos commented on August 20, 2024

@Vetsoo Where is that line at exactly?

@DesmondANIMUS The Microsoft Bot Framework isn't used in this project. as @Yucked said, this project uses DSharpPlus. It is a library for writing aps with the Discord API.

Sorry for being inactive, I was at work c:

from modcore.

Vetsoo avatar Vetsoo commented on August 20, 2024

public static void InstallListeners(DiscordClient client, Bot bot)
{
// find all methods from ModCore with AsyncListener attr
ListenerMethods =
from a in AppDomain.CurrentDomain.GetAssemblies()
from t in a.GetTypes()
where t.Namespace.StartsWith("ModCore")
from m in t.GetMethods()
let attribute = m.GetCustomAttribute(typeof(AsyncListenerAttribute), true)
where attribute != null
select new ListenerMethod { Method = m, Attribute = attribute as AsyncListenerAttribute };

        foreach (var listener in ListenerMethods)
        {
            listener.Attribute.Register(bot, client, listener.Method);
        }
    }

from modcore.

Naamloos avatar Naamloos commented on August 20, 2024

Do you have a token setup in settings.json?

from modcore.

Vetsoo avatar Vetsoo commented on August 20, 2024

Yes I do. My bot is also added in my server. Do I need anything else?

from modcore.

Naamloos avatar Naamloos commented on August 20, 2024

I'm taking a look at it. Errors for me as well.

from modcore.

Naamloos avatar Naamloos commented on August 20, 2024

@Vetsoo The latest commit fixes it. Please pull the new version off of GitHub c;

from modcore.

Naamloos avatar Naamloos commented on August 20, 2024

No more responses. Guess it's time to close this one.

from modcore.

Related Issues (20)

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.