Created
June 16, 2020 04:32
-
-
Save compil3/994d6109bc6844b7e9b58e0f63e36d67 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async Task HandleCommand(SocketMessage messageParam) | |
{ | |
var message = messageParam as SocketUserMessage; | |
if (message == null) return; | |
var argPos = 0; | |
if (!(message.HasCharPrefix('.', ref argPos) || | |
message.HasMentionPrefix(_discord.CurrentUser, ref argPos)) || message.Author.IsBot) return; | |
var context = new SocketCommandContext(_discord, message); | |
var result = await _commands.ExecuteAsync(context, argPos, null); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment