status-go/protocol/requests/import_discord_community.go

28 lines
555 B
Go
Raw Permalink Normal View History

2022-09-29 11:50:23 +00:00
package requests
import (
"errors"
)
var (
ErrImportDiscordCommunityMissingFilesToImport = errors.New("import-discord-community: missing files to import")
)
type ImportDiscordCommunity struct {
CreateCommunity
FilesToImport []string
From int64
}
func (u *ImportDiscordCommunity) Validate() error {
if len(u.FilesToImport) == 0 {
return ErrImportDiscordCommunityMissingFilesToImport
}
return u.CreateCommunity.Validate()
}
func (u *ImportDiscordCommunity) ToCreateCommunityRequest() *CreateCommunity {
return &u.CreateCommunity
}