Giter VIP home page Giter VIP logo

discord-bot-tutorial's People

Contributors

dapperdino 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

Watchers

 avatar  avatar  avatar  avatar  avatar

discord-bot-tutorial's Issues

i have a problem

Commands = Client.UseCommandsNext(commandsConfig); is shownig an error
(0029: cannot implicitly convert type 'DSharpPlus.CommandsNext.CommandsNextExtension' to 'DSharpPlus.CommandsNext.CommandsNextConfiguration')
can you please help me?

Version no Longer Exist

This tutorial a Whole video used DSharpPlus 4.0.0-nightly-00635
the problem is too much diff with the newer pre release so as a newbie cannot follow

as pre release the version is increasing fast and older one will be removed
i think the package DSharpPlus 4.0.0-nightly-00812 must be included in this tutorial also.

Context Error

[2021-10-30 21:41:33 +06:00] [101 /Startup ] [Info ] DSharpPlus, version 4.0.0-rc1
info: Microsoft.Hosting.Lifetime[0]
Now listening on: http://localhost:5000
info: Microsoft.Hosting.Lifetime[0]
Now listening on: https://localhost:5001
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: C:\Users\ASUS ROG\Desktop\Discord-Bot-Tutorial-master\DiscordBotTutorial.Bots\bin\Debug\netcoreapp3.1
info: Microsoft.EntityFrameworkCore.Infrastructure[10403]
Entity Framework Core 3.1.1 initialized 'RPGContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: MigrationsAssembly=DiscordBotTutorial.DAL.Migrations
fail: Microsoft.EntityFrameworkCore.Database.Command[20102]
Failed executing DbCommand (42ms) [Parameters=[@__guildId_0='?' (DbType = Decimal), @__discordId_1='?' (DbType = Decimal)], CommandType='Text', CommandTimeout='30']
SELECT [t].[Id], [t].[DiscordId], [t].[Gold], [t].[GuildId], [t].[Xp], [t0].[Id], [t0].[ItemId], [t0].[ProfileId], [t0].[Id0], [t0].[Description], [t0].[Name], [t0].[Price]
FROM (
SELECT TOP(1) [p].[Id], [p].[DiscordId], [p].[Gold], [p].[GuildId], [p].[Xp]
FROM [Profiles] AS [p]
WHERE ([p].[GuildId] = @__guildId_0) AND ([p].[DiscordId] = @__discordId_1)
) AS [t]
LEFT JOIN (
SELECT [p0].[Id], [p0].[ItemId], [p0].[ProfileId], [i].[Id] AS [Id0], [i].[Description], [i].[Name], [i].[Price]
FROM [ProfileItems] AS [p0]
INNER JOIN [Items] AS [i] ON [p0].[ItemId] = [i].[Id]
) AS [t0] ON [t].[Id] = [t0].[ProfileId]
ORDER BY [t].[Id], [t0].[Id], [t0].[Id0]
fail: Microsoft.EntityFrameworkCore.Query[10100]
An exception occurred while iterating over the results of a query for context type 'DiscordBotTutorial.DAL.RPGContext'.
Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Profiles'.
at Microsoft.Data.SqlClient.SqlCommand.<>c.b__164_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.AsyncEnumerator.MoveNextAsync()
ClientConnectionId:68e0044b-ddcb-4b05-af6e-0cb66be37432
Error Number:208,State:1,Class:16
Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Profiles'.
at Microsoft.Data.SqlClient.SqlCommand.<>c.b__164_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.AsyncEnumerator.MoveNextAsync()
ClientConnectionId:68e0044b-ddcb-4b05-af6e-0cb66be37432
Error Number:208,State:1,Class:16

OnClientReady Function no matching overload

The OnClientReady function is not working with Client.Ready and is coming up with an error stating:

Error CS0123 No overload for 'OnClientReady' matches delegate 'AsyncEventHandler<DiscordClient, ReadyEventArgs>' MrBastard 18 Active

my code for the "Bot.cs" file:

namespace MrBastard
{
public class Bot
{
public DSharpPlus.DiscordClient Client { get; private set; }

    public async Task RunAsync()
    {
        var config = new DSharpPlus.DiscordConfiguration
        {

        };

        Client = new DSharpPlus.DiscordClient(config);

        Client.Ready += OnClientReady;      <-- line 18
    }

    private Task OnClientReady(DSharpPlus.EventArgs.ReadyEventArgs e)
    {
        return null;
    }
}

}

Don't know why it is doing this or how to fix it. Help would be appreciated.

issue (duh)

Commands = Client.UseCommandsNext(commandsConfig); is wrong for me idk why im still on the first tutorial

BaseCommandModule no longer exsists

so I am trying to create a commands class like in the second tutorial, but BaseCommandModule is no longer a thing and I cannot figure out what to use instead...

using DSharpPlus.CommandsNext;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RolePlayHelperBot.Commands
{
    public class MainCommands : BaseCommandModule
    {
    }
}

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.