- Introduce Discord adapter in the robot lifecycle to enable integration with Discord events. - Update the integration dispatcher to recognize and handle events from Discord. - Modify the configuration structure to include settings for Discord integration. - Enhance the integration parsing logic to support Discord configurations.
21 lines
442 B
Go
21 lines
442 B
Go
package discord
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestNewBot(t *testing.T) {
|
|
bot, err := NewBot("test-token", "test-app-id")
|
|
if err != nil {
|
|
t.Fatalf("NewBot: %v", err)
|
|
}
|
|
if bot.Token() != "test-token" {
|
|
t.Fatalf("expected token test-token, got %s", bot.Token())
|
|
}
|
|
if bot.AppID() != "test-app-id" {
|
|
t.Fatalf("expected appID test-app-id, got %s", bot.AppID())
|
|
}
|
|
if bot.Session() == nil {
|
|
t.Fatal("Session() should not be nil")
|
|
}
|
|
}
|