mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-13 15:34:38 +01:00
initial commit
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
package discordbot
|
||||
|
||||
import (
|
||||
"erupe-ce/config"
|
||||
"errors"
|
||||
_config "erupe-ce/config"
|
||||
"regexp"
|
||||
|
||||
"github.com/bwmarrin/discordgo"
|
||||
"go.uber.org/zap"
|
||||
"regexp"
|
||||
)
|
||||
|
||||
var Commands = []*discordgo.ApplicationCommand{
|
||||
@@ -104,14 +106,14 @@ func (bot *DiscordBot) NormalizeDiscordMessage(message string) string {
|
||||
return result
|
||||
}
|
||||
|
||||
func (bot *DiscordBot) RealtimeChannelSend(message string) (err error) {
|
||||
func (bot *DiscordBot) RealtimeChannelSend(message string) (messageId string, err error) {
|
||||
if bot.RelayChannel == nil {
|
||||
return
|
||||
return "", errors.New("RelayChannel is nil")
|
||||
}
|
||||
|
||||
_, err = bot.Session.ChannelMessageSend(bot.RelayChannel.ID, message)
|
||||
msg, err := bot.Session.ChannelMessageSend(bot.RelayChannel.ID, message)
|
||||
|
||||
return
|
||||
return msg.ID, err
|
||||
}
|
||||
|
||||
func ReplaceTextAll(text string, regex *regexp.Regexp, handler func(input string) string) string {
|
||||
|
||||
Reference in New Issue
Block a user