mirror of
https://gitlab.durp.info/durfy/apps/durpot.git
synced 2026-05-07 07:50:32 -05:00
updates
This commit is contained in:
parent
b719dbd9fc
commit
618b4e290a
6 changed files with 127 additions and 156 deletions
27
handlers/start.go
Normal file
27
handlers/start.go
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
package handlers
|
||||
|
||||
import (
|
||||
"github.com/bwmarrin/discordgo"
|
||||
"gitlab.com/DeveloperDurp/durpot/model"
|
||||
)
|
||||
|
||||
func Start() error {
|
||||
goBot, err := discordgo.New("Bot " + model.Token)
|
||||
|
||||
if err != nil {
|
||||
return (err)
|
||||
}
|
||||
|
||||
goBot.AddHandler(MessageHandler)
|
||||
goBot.AddHandler(GuildMemberAdd)
|
||||
goBot.AddHandler(GuildMemberRemove)
|
||||
goBot.AddHandler(HandleTag)
|
||||
|
||||
err = goBot.Open()
|
||||
|
||||
if err != nil {
|
||||
return (err)
|
||||
}
|
||||
|
||||
return (err)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue