DSharpPlus.Exceptions.UnauthorizedException:未经授权:403

时间:2018-06-04 01:33:56

标签: c# discord

我正在使用C#编写机器人,我收到错误 - 我使用DSharpPlus https://dsharpplus.emzi0767.com/

DSharpPlus.Exceptions.UnauthorizedException: Unauthorized: 403

当我使用成员更改昵称时,我已经将discord bot设置为管理级别。

    public async Task Family(CommandContext context, [RemainingText] string family)
    {
        if (family.Equals("")) return;
        var member = context.Member;
        await member.ModifyAsync(family);
        await context.TriggerTypingAsync();
        await context.RespondAsync($"@here, {context.Member.Mention} definiu o nome de família para {family}.");
        await context.Member.SendMessageAsync($"Você definiu seu nome de família para {family}, ficará mais fácil para os jogadores da guilda te reconhecerem. Caso troque o seu nome de família no jogo, apenas use o comando novamente.");
    }

错误在这一行:

    await member.ModifyAsync(family);

0 个答案:

没有答案
相关问题