<commit_before>package core

import (
	"github.com/hexbotio/hex/commands"
	"github.com/hexbotio/hex/models"
	"github.com/hexbotio/hex/parse"
	"github.com/mohae/deepcopy"
)

func Commands(message models.Message, outputMsgs chan<- models.Message, rules *map[string]models.Rule, config models.Config) {

	if parse.Match("help*", message.Attributes["hex.input"]) {
		msg := deepcopy.Copy(message).(models.Message)
		commands.Help(&msg, rules, config)
		outputMsgs <- msg
	}

	if parse.Match("version", message.Attributes["hex.input"]) {
		msg := deepcopy.Copy(message).(models.Message)
		commands.Version(&msg, config)
		outputMsgs <- msg
	}

	if parse.Match("ping", message.Attributes["hex.input"]) {
		msg := deepcopy.Copy(message).(models.Message)
		commands.Ping(&msg)
		outputMsgs <- msg
	}

	if parse.Match("rules", message.Attributes["hex.input"]) {
		if parse.EitherMember(config.Admins, message.Attributes["hex.user"], message.Attributes["hex.channel"]) {
			msg := deepcopy.Copy(message).(models.Message)
			commands.Rules(&msg, rules, config)
			outputMsgs <- msg
		}
	}

}
<commit_msg>fixed built-in commands to set the message.EndTime<commit_after>package core

import (
	"github.com/hexbotio/hex/commands"
	"github.com/hexbotio/hex/models"
	"github.com/hexbotio/hex/parse"
	"github.com/mohae/deepcopy"
)

func Commands(message models.Message, outputMsgs chan<- models.Message, rules *map[string]models.Rule, config models.Config) {

	if parse.Match("help*", message.Attributes["hex.input"]) {
		msg := deepcopy.Copy(message).(models.Message)
		commands.Help(&msg, rules, config)
		msg.EndTime = models.MessageTimestamp()
		outputMsgs <- msg
	}

	if parse.Match("version", message.Attributes["hex.input"]) {
		msg := deepcopy.Copy(message).(models.Message)
		commands.Version(&msg, config)
		msg.EndTime = models.MessageTimestamp()
		outputMsgs <- msg
	}

	if parse.Match("ping", message.Attributes["hex.input"]) {
		msg := deepcopy.Copy(message).(models.Message)
		commands.Ping(&msg)
		msg.EndTime = models.MessageTimestamp()
		outputMsgs <- msg
	}

	if parse.Match("rules", message.Attributes["hex.input"]) {
		if parse.EitherMember(config.Admins, message.Attributes["hex.user"], message.Attributes["hex.channel"]) {
			msg := deepcopy.Copy(message).(models.Message)
			commands.Rules(&msg, rules, config)
			msg.EndTime = models.MessageTimestamp()
			outputMsgs <- msg
		}
	}

}

{'fraction_non_alphanumeric': 0.16471571906354515, 'fraction_numerical': 0.0, 'mean_word_length': 4.780193236714976, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3343756', 'n_tokens_mistral': 865, 'n_tokens_neox': 797, 'n_words': 130}