[ifcbrk] feature: suppress messages
yeah man I support the first amendment
This commit is contained in:
@@ -20,6 +20,7 @@ namespace Discord.Rest
|
||||
|
||||
var args = new MessageProperties();
|
||||
func(args);
|
||||
|
||||
var apiArgs = new API.Rest.ModifyMessageParams
|
||||
{
|
||||
Content = args.Content,
|
||||
@@ -35,6 +36,15 @@ namespace Discord.Rest
|
||||
await client.ApiClient.DeleteMessageAsync(channelId, msgId, options).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public static async Task SuppressEmbedsAsync(IMessage msg, BaseDiscordClient client, bool suppress, RequestOptions options)
|
||||
{
|
||||
var apiArgs = new API.Rest.SuppressEmbedParams
|
||||
{
|
||||
Suppressed = suppress
|
||||
};
|
||||
await client.ApiClient.SuppressEmbedAsync(msg.Channel.Id, msg.Id, apiArgs, options).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public static async Task AddReactionAsync(IMessage msg, IEmote emote, BaseDiscordClient client, RequestOptions options)
|
||||
{
|
||||
await client.ApiClient.AddReactionAsync(msg.Channel.Id, msg.Id, emote is Emote e ? $"{e.Name}:{e.Id}" : emote.Name, options).ConfigureAwait(false);
|
||||
|
||||
Reference in New Issue
Block a user