Discord.Net DependencyMap 问题

Discord.Net DependencyMap issue

我在创建依赖关系图时遇到问题,因为我认为它是 Discord.Commands 的一部分。我所能找到的只是样本和机器人已经在使用与我相同的线路,但我的 visual studio 认为这是一个错误。

using System;
using System.Reflection;
using System.Threading.Tasks;
using Discord;
using Discord.WebSocket;
using Discord.Commands;

namespace UCS_bot
{
    public class Program
    {

    public static void Main(string[] args) =>
        new Program().Start().GetAwaiter().GetResult();

    private DiscordSocketClient client;
    private CommandHandler handler;

    public async Task Start()
    {
        client = new DiscordSocketClient(new DiscordSocketConfig() { LogLevel = LogSeverity.Info });

        var token = "******";
        await client.LoginAsync(TokenType.Bot, token);
        await client.StartAsync();

        var map = new DependancyMap();
        map.Add(client);

它一直说我缺少 using 指令,但我 99% 确定它是 Discord.Commands

我该如何解决这个问题?

可能是打错了,应该是DependencyMap而不是DependancyMap

https://discord.foxbot.me/docs/api/Discord.Commands.DependencyMap.html