Skip to content

Commit 151b0fc

Browse files
authored
Merge pull request #36 from brandons209/update-3.5
permission fixes for slash commands
2 parents e0e2e3d + 791c534 commit 151b0fc

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

activitylog/activitylog.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1184,8 +1184,9 @@ async def userinfo(self, ctx: commands.Context, *, member: Optional[discord.Memb
11841184
else:
11851185
try:
11861186
await author.send(embed=data)
1187+
await ctx.reply(info("I sent your info to your DMs!"), delete_after=30)
11871188
except discord.HTTPException:
1188-
await ctx.send(
1189+
await ctx.reply(
11891190
error("Please allow messages from server members to get your info."),
11901191
delete_after=30,
11911192
reference=ctx.message,

moreadmin/moreadmin.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,8 @@ async def notes(self, ctx):
470470
pass
471471

472472
@notes.command(name="add")
473+
@commands.guild_only()
474+
@checks.mod()
473475
async def notes_add(self, ctx, member: discord.Member, *, note: str):
474476
"""
475477
Add a new note to a user.
@@ -481,6 +483,8 @@ async def notes_add(self, ctx, member: discord.Member, *, note: str):
481483
await ctx.tick()
482484

483485
@notes.command(name="list")
486+
@commands.guild_only()
487+
@checks.mod()
484488
async def notes_list(self, ctx, member: discord.Member):
485489
"""
486490
List notes for a user.

punish/punish.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ async def register_casetypes():
102102

103103
@commands.hybrid_group(invoke_without_command=True)
104104
@commands.guild_only()
105-
@checks.mod()
105+
@checks.mod_or_permissions(administrator=True)
106106
async def punish(
107107
self,
108108
ctx: commands.Context,
@@ -123,6 +123,8 @@ async def punish(
123123
await self._punish_cmd_common(ctx, user, duration, reason)
124124

125125
@punish.command(name="start")
126+
@commands.guild_only()
127+
@checks.mod()
126128
async def punish_start(
127129
self,
128130
ctx: commands.Context,

0 commit comments

Comments
 (0)