mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-05-07 22:46:30 +03:00
Bring back easter eggs
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
b1855c5257
commit
586e260c92
2 changed files with 29 additions and 1 deletions
|
@ -11,6 +11,7 @@ using Remora.Discord.Caching.Services;
|
|||
using Remora.Discord.Extensions.Embeds;
|
||||
using Remora.Discord.Extensions.Formatting;
|
||||
using Remora.Discord.Gateway.Responders;
|
||||
using Remora.Rest.Core;
|
||||
using Remora.Results;
|
||||
|
||||
// ReSharper disable UnusedType.Global
|
||||
|
@ -305,3 +306,28 @@ public class GuildMemberUpdateResponder : IResponder<IGuildMemberUpdate> {
|
|||
return Result.FromSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles sending replies to easter egg messages.
|
||||
/// </summary>
|
||||
public class MessageCreateResponder : IResponder<IMessageCreate> {
|
||||
private readonly IDiscordRestChannelAPI _channelApi;
|
||||
|
||||
public MessageCreateResponder(IDiscordRestChannelAPI channelApi) {
|
||||
_channelApi = channelApi;
|
||||
}
|
||||
|
||||
public Task<Result> RespondAsync(IMessageCreate gatewayEvent, CancellationToken ct = default) {
|
||||
_ = _channelApi.CreateMessageAsync(
|
||||
gatewayEvent.ChannelID, ct: ct, content: gatewayEvent.Content switch {
|
||||
"whoami" => "`nobody`",
|
||||
"сука !!" => "`root`",
|
||||
"воооо" => "`removing /...`",
|
||||
"пон" =>
|
||||
"https://cdn.discordapp.com/attachments/837385840946053181/1087236080950055023/vUORS10xPaY-1.jpg",
|
||||
"++++" => "#",
|
||||
_ => default(Optional<string>)
|
||||
});
|
||||
return Task.FromResult(Result.FromSuccess());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue