-
Автор темы
- #1
Приветствую. Делал бота по данному гайду -
С токеном всё в порядке, правами доступа тоже.
https://yougame.biz/threads/221583/
. Всё бы ничего. Но при попытке использовать ту же команду !echo text
в консоль выбивает ошибку в которой ссылается на строку - await Context.Channel.SendMessageAsync(msg);
. Так же и для второй команды. Ниже прилагаю код из консоли.
Error Code:
fail: Discord.Commands.CommandService[0]
Command:
Discord.Commands.CommandException: Error occurred executing "echo" for ?MyNick?#8766 in MyServer/talk.
---> Discord.Net.HttpException: The server responded with error 401: 401: Unauthorized
at Discord.Net.Queue.RequestBucket.SendAsync(RestRequest request)
at Discord.Net.Queue.RequestQueue.SendAsync(RestRequest request)
at Discord.API.DiscordRestApiClient.SendInternalAsync(String method, String endpoint, RestRequest request)
at Discord.API.DiscordRestApiClient.SendJsonAsync[TResponse](String method, String endpoint, Object payload, BucketId bucketId, ClientBucketType clientBucket, RequestOptions options)
at Discord.API.DiscordRestApiClient.CreateMessageAsync(UInt64 channelId, CreateMessageParams args, RequestOptions options)
at Discord.Rest.ChannelHelper.SendMessageAsync(IMessageChannel channel, BaseDiscordClient client, String text, Boolean isTTS, Embed embed, AllowedMentions allowedMentions, MessageReference messageReference, MessageComponent components, ISticker[] stickers, RequestOptions options, Embed[] embeds, MessageFlags flags)
at BH_Support_0._0._1.Modules.General.Echo(String msg) in B:\MyFolder\MyFolder\MyFolder\Modules\General.cs:line 17
at Discord.Commands.ModuleClassBuilder.<>c__DisplayClass6_0.<<BuildCommand>g__ExecuteCallback|0>d.MoveNext()
--- End of stack trace from previous location ---
at Discord.Commands.CommandInfo.ExecuteInternalAsync(ICommandContext context, Object[] args, IServiceProvider services)
--- End of inner exception stack trace ---
dbug: Discord.Commands.CommandService[0]
Command: Executed "echo" for ?MyNick?#8766 in MyServer/talk
Последнее редактирование: