Remove Common, Rework External Chat Support, & Bugfixes (!5)
Co-authored-by: Layla <layla@layla.gg> Reviewed-on: https://gitea.sumulayla.synology.me/layla/birdbot/pulls/5
This commit is contained in:
@ -4,7 +4,7 @@ import (
|
||||
"log"
|
||||
|
||||
"github.com/bwmarrin/discordgo"
|
||||
"github.com/yeslayla/birdbot/common"
|
||||
"github.com/yeslayla/birdbot-common/common"
|
||||
)
|
||||
|
||||
// RegisterCommand creates an new command that can be used to interact with bird bot
|
||||
|
@ -2,7 +2,7 @@ package discord
|
||||
|
||||
import (
|
||||
"github.com/bwmarrin/discordgo"
|
||||
"github.com/yeslayla/birdbot/common"
|
||||
"github.com/yeslayla/birdbot-common/common"
|
||||
)
|
||||
|
||||
type Button struct {
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/bwmarrin/discordgo"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"github.com/yeslayla/birdbot/common"
|
||||
"github.com/yeslayla/birdbot-common/common"
|
||||
"github.com/yeslayla/birdbot/persistence"
|
||||
)
|
||||
|
||||
@ -125,7 +125,7 @@ func (discord *Discord) OnEventUpdate(handler func(*Discord, common.Event)) {
|
||||
// OnMessageRecieved registers a handler when a message is recieved
|
||||
func (discord *Discord) OnMessageRecieved(handler func(*Discord, string, common.User, string)) {
|
||||
discord.session.AddHandler(func(s *discordgo.Session, r *discordgo.MessageCreate) {
|
||||
if r.GuildID != discord.guildID {
|
||||
if r.GuildID != discord.guildID || r.Author.Bot {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/bwmarrin/discordgo"
|
||||
"github.com/yeslayla/birdbot/common"
|
||||
"github.com/yeslayla/birdbot-common/common"
|
||||
"github.com/yeslayla/birdbot/core"
|
||||
)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"log"
|
||||
|
||||
"github.com/bwmarrin/discordgo"
|
||||
"github.com/yeslayla/birdbot/common"
|
||||
"github.com/yeslayla/birdbot-common/common"
|
||||
)
|
||||
|
||||
// NewUser creates a new user object from a discordgo.User object
|
||||
|
Reference in New Issue
Block a user