yao/integrations/discord/e2e_test.go
Max 5333302055 Add Discord integration support in robot lifecycle
- 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.
2026-03-02 07:53:49 +08:00

27 lines
588 B
Go

package discord
import (
"testing"
)
// TestE2E_01_BotUser verifies the Discord bot token by fetching bot user info.
func TestE2E_01_BotUser(t *testing.T) {
skipIfNoToken(t)
bot := testBot(t)
user, err := bot.BotUser()
if err != nil {
t.Fatalf("BotUser: %v", err)
}
if user.ID == "" {
t.Error("user.ID should not be empty")
}
if user.Username == "" {
t.Error("user.Username should not be empty")
}
if !user.Bot {
t.Error("user.Bot should be true")
}
t.Logf("OK id=%s username=%s discriminator=%s bot=%v",
user.ID, user.Username, user.Discriminator, user.Bot)
}