fix: crashing if user doesn't have access to channel
This commit is contained in:
parent
57734b62dd
commit
1d940b0f7d
1 changed files with 53 additions and 49 deletions
|
@ -186,6 +186,7 @@ namespace chord
|
|||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
var restSharpClient = new RestClient("https://discord.com/api/v9");
|
||||
var restSharpReq = new RestRequest($"channels/{currentSelectedChannel}/messages");
|
||||
restSharpClient.AddDefaultHeader("Authorization", settings.Token);
|
||||
|
@ -243,6 +244,9 @@ namespace chord
|
|||
{
|
||||
userListTree.AddObject(role.Value);
|
||||
}
|
||||
} catch {
|
||||
await chatBoxList.SetSourceAsync(new List<string>());
|
||||
}
|
||||
};
|
||||
|
||||
messageBoxSend.Clicked += async () =>
|
||||
|
|
Reference in a new issue