[Reports] Add guild-only command check (#2016)

Resolves #2015
This commit is contained in:
Michael H 2018-08-16 10:00:24 -04:00 committed by Toby Harradine
parent ae7b912ac8
commit b550f38eed

View File

@ -317,6 +317,7 @@ class Reports:
if msgs: if msgs:
self.tunnel_store[k]["msgs"] = msgs self.tunnel_store[k]["msgs"] = msgs
@commands.guild_only()
@checks.mod_or_permissions(manage_members=True) @checks.mod_or_permissions(manage_members=True)
@report.command(name="interact") @report.command(name="interact")
async def response(self, ctx, ticket_number: int): async def response(self, ctx, ticket_number: int):
@ -329,7 +330,6 @@ class Reports:
Tunnels do not persist across bot restarts. Tunnels do not persist across bot restarts.
""" """
# note, mod_or_permissions is an implicit guild_only
guild = ctx.guild guild = ctx.guild
rec = await self.config.custom("REPORT", guild.id, ticket_number).report() rec = await self.config.custom("REPORT", guild.id, ticket_number).report()