Fix tests

This commit is contained in:
Rory&
2026-07-15 05:26:49 +02:00
parent 8f42f29f07
commit 7ce26e6ab2
2 changed files with 12 additions and 6 deletions
@@ -229,9 +229,15 @@ public class MessageTests(ITestOutputHelper testOutputHelper, TestFixture fixtur
Client.Gateway.OnceGatewayMessage.Add(async payload => {
if (payload is { Opcode: GatewayOpcode.S2CDispatch, DispatchEventType: "READY" }) {
_testOutputHelper.WriteLine("Got ready: {0} {1} ({2} data keys)", payload.Opcode, payload.DispatchEventType, payload.EventData!.Count);
await Channel.SendMessageAsync(new MessageSchema() {
});
var mPayload = new JsonObject() {
{ "content", "meow" }
};
var reqContent = new MultipartFormDataContent();
reqContent.Add(JsonContent.Create(mPayload), "payload_json");
var res = await Assert.HttpSuccess(await Client.ApiHttpClient.PostAsync($"channels/{Channel.Id}/messages", reqContent,
cancellationToken: TestContext.Current.CancellationToken));
return false;
}
@@ -130,9 +130,9 @@ public class SpacebarClientChannel(AuthenticatedSpacebarClient client, long chan
return (await resp.Content.ReadFromJsonAsync<Channel>())!;
}
public async Task SendMessageAsync(MessageSchema messageSchema) {
throw new NotImplementedException();
}
// public async Task SendMessageAsync(MessageSchema messageSchema) {
// throw new NotImplementedException();
// }
}
public class SpacebarClientGuild(AuthenticatedSpacebarClient client, long guildId) {