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
actorDiscordUserThe user or member to use as message author.
channelDiscordChannelThe channel the message is supposed to appear from.
messageContentsstringContents of the message.
prefixstringCommand prefix, used to execute commands.
cmdCommandCommand to execute.
rawArgumentsstringRaw arguments to pass to command.
Returns
- CommandContext
Created fake context.