Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Log playtester proxy pings #16

Merged
merged 1 commit into from
Aug 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions reaper/cogs/playtester_ping_proxy.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
import logging
import coloredlogs

logger = logging.getLogger(__name__)
coloredlogs.install(
level="DEBUG", logger=logger, fmt="%(asctime)s - %(levelname)s - %(message)s"
)

from discord.ext import commands
from util import globals

Expand All @@ -18,8 +26,12 @@ async def playtester_ping(self, ctx):
# Check whether command invoker has necessary roles
if any(element.id in allowed_roles for element in ctx.author.roles):
playtester_role_id = globals.config["roles"]["playtester-role-id"]
logger.info(f"{ctx.author.display_name} pinged playtesters")
await ctx.send(f"<@&{playtester_role_id}>")
else:
logger.info(
f"{ctx.author.display_name} tried to ping playtesters but was lacking permissions to do so"
)
await ctx.send("Missing perms to ping playtesters", ephemeral=True)


Expand Down