Table of Contents

Method CreateFakeContext

Namespace
DisCatSharp.CommandsNext
Assembly
DisCatSharp.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 DiscordUser

The user or member to use as message author.

channel DiscordChannel

The channel the message is supposed to appear from.

messageContents string

Contents of the message.

prefix string

Command prefix, used to execute commands.

cmd Command

Command to execute.

rawArguments string

Raw arguments to pass to command.

Returns

CommandContext

Created fake context.