Added .eval command. Very dangerous, don't use.

This commit is contained in:
Kwoth
2022-06-23 13:19:41 +00:00
parent f1d9db699f
commit df85b3b250
8 changed files with 126 additions and 65 deletions

View File

@@ -1305,4 +1305,6 @@ patron:
- patron
patronmessage:
- patronmessage
- patronmsg
- patronmsg
eval:
- eval

View File

@@ -2215,3 +2215,17 @@ patronmessage:
desc: "Sends a message to all patrons of the specified tier and higher. Supports embeds."
args:
- "x hello"
eval:
desc: |-
Execute arbitrary C# code and (optionally) return a result. Several namespaces are included by default.
Special variables available:
`self` - Instance of the command group executing the command (this)
`guild` - Server in which the command is executed
`channel` - Channel in which the command is executed
`user` - User executing the command
`ctx` - Discord.Net command context
`services` - Nadeko's IServiceProvider
args:
- "123 / 4.5f"
- "await ctx.OkAsync();"
- 'await ctx.SendConfirmAsync("uwu");'