Method CreateFakeContext
- Namespace
- DSharpPlus.CommandsNext
- Assembly
- DSharpPlus.CommandsNext.dll
CreateFakeContext(DiscordUser, DiscordChannel, string, string, Command, string?)
Creates a fake command context to execute commands with.
public CommandContext CreateFakeContext(DiscordUser actor, DiscordChannel channel, string messageContents, string prefix, Command cmd, string? rawArguments = null)
Parameters
actor
DiscordUserThe user or member to use as message author.
channel
DiscordChannelThe channel the message is supposed to appear from.
messageContents
stringContents of the message.
prefix
stringCommand prefix, used to execute commands.
cmd
CommandCommand to execute.
rawArguments
stringRaw arguments to pass to command.
Returns
- CommandContext
Created fake context.