updateStageInstance method
Future<StageInstance>
updateStageInstance(
- Snowflake channelId,
- StageInstanceUpdateBuilder builder, {
- String? auditLogReason,
Update the stage instance for a channel.
Implementation
Future<StageInstance> updateStageInstance(Snowflake channelId, StageInstanceUpdateBuilder builder, {String? auditLogReason}) async {
final route = HttpRoute()..stageInstances(id: channelId.toString());
final request = BasicRequest(
route,
method: 'PATCH',
body: jsonEncode(builder.build()),
auditLogReason: auditLogReason,
);
final response = await client.httpHandler.executeSafe(request);
final stageInstance = parseStageInstance(response.jsonBody as Map<String, Object?>);
client.updateCacheWith(stageInstance);
return stageInstance;
}