Skip to content

Commit

Permalink
feat: Add missing audit log
Browse files Browse the repository at this point in the history
  • Loading branch information
LeadcodeDev committed Mar 6, 2023
1 parent e5b0f37 commit b4e0268
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/src/api/messages/partial_message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ class PartialMessage<T extends PartialChannel> {
DateTime get createdAt => DateTime.parse(_timestamp);
DateTime? get updatedAt => _editedTimestamp != null ? DateTime.parse(_editedTimestamp!) : null;

Future<void> delete () async {
Future<void> delete ({ String? reason }) async {
await ioc.use<DiscordApiHttpService>()
.destroy(url: '/channels/$_channelId/messages/$id')
.auditLog(reason)
.build();
}
}

0 comments on commit b4e0268

Please sign in to comment.