omg
This commit is contained in:
parent
41e180c79a
commit
2c8ff7e8d4
1 changed files with 2 additions and 2 deletions
|
@ -200,7 +200,7 @@ class EvalModule(niobot.Module):
|
|||
|
||||
@niobot.command()
|
||||
@niobot.is_owner()
|
||||
async def runas(self, ctx: niobot.Context, user: str, command: str, *args):
|
||||
async def runas(self, ctx: niobot.Context, user: str, command: str, *args: str):
|
||||
"""Run a command as another user."""
|
||||
if args and args[0] == "%null%":
|
||||
args = tuple()
|
||||
|
@ -210,7 +210,7 @@ class EvalModule(niobot.Module):
|
|||
if args:
|
||||
event.body += " " + " ".join(args)
|
||||
try:
|
||||
result = await self.bot.process_message(event)
|
||||
result = await self.bot.process_message(ctx.room, event)
|
||||
await ctx.respond(f"Result of runas: `{result!r}`")
|
||||
except Exception as e:
|
||||
await ctx.respond(f"Error in runas process: `{e!r}`")
|
||||
|
|
Loading…
Reference in a new issue