aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Sebastiaan Zeeff <[email protected]>2020-09-20 13:29:00 +0200
committerGravatar Sebastiaan Zeeff <[email protected]>2020-09-20 13:29:00 +0200
commitef31ddad7a736ccea5662cd1e192d3663f587bd7 (patch)
treee3d9f07e86038fe4208cb96482043125c792cc70
parentUse helper for duckpond's locked relay feature (diff)
Add command to relay a message to duckpond
This commit adds a command that allows admins to manually relay a message to the duckpond, regardless of duck counts and the checks done in the reaction event handler. Signed-off-by: Sebastiaan Zeeff <[email protected]>
-rw-r--r--bot/cogs/duck_pond.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/bot/cogs/duck_pond.py b/bot/cogs/duck_pond.py
index 6156c3238..2758de8ab 100644
--- a/bot/cogs/duck_pond.py
+++ b/bot/cogs/duck_pond.py
@@ -4,10 +4,11 @@ from typing import Union
import discord
from discord import Color, Embed, Member, Message, RawReactionActionEvent, User, errors
-from discord.ext.commands import Cog
+from discord.ext.commands import Cog, Context, command
from bot import constants
from bot.bot import Bot
+from bot.decorators import with_role
from bot.utils.messages import send_attachments
from bot.utils.webhooks import send_webhook
@@ -183,6 +184,15 @@ class DuckPond(Cog):
if duck_count >= constants.DuckPond.threshold:
await message.add_reaction("✅")
+ @command(name="duckify", aliases=("duckpond", "pondify"))
+ @with_role(constants.Roles.admins)
+ async def duckify(self, ctx: Context, message: discord.Message) -> None:
+ """Relay a message to the duckpond, no ducks required!"""
+ if await self.locked_relay(message):
+ await ctx.message.add_reaction("🦆")
+ else:
+ await ctx.message.add_reaction("❌")
+
def setup(bot: Bot) -> None:
"""Load the DuckPond cog."""