From ee67aaa604c008933f18a74259e91b010a4e0674 Mon Sep 17 00:00:00 2001 From: mlnrDev Date: Fri, 9 Feb 2024 14:33:57 +0100 Subject: [PATCH] add SetNonce and SetEnforceNonce to MessageCreateBuilder ton is a moron --- discord/message_create_builder.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/discord/message_create_builder.go b/discord/message_create_builder.go index bdf04fae7..bba78c692 100644 --- a/discord/message_create_builder.go +++ b/discord/message_create_builder.go @@ -32,6 +32,18 @@ func (b *MessageCreateBuilder) SetContentf(content string, a ...any) *MessageCre return b.SetContent(fmt.Sprintf(content, a...)) } +// SetNonce sets the Message nonce +func (b *MessageCreateBuilder) SetNonce(nonce string) *MessageCreateBuilder { + b.Nonce = nonce + return b +} + +// SetEnforceNonce sets whether the Message should be checked for uniqueness (use with SetNonce) +func (b *MessageCreateBuilder) SetEnforceNonce(enforce bool) *MessageCreateBuilder { + b.EnforceNonce = enforce + return b +} + // SetTTS sets whether the Message should be text to speech func (b *MessageCreateBuilder) SetTTS(tts bool) *MessageCreateBuilder { b.TTS = tts