Documentation
¶
Index ¶
Constants ¶
View Source
const ( ErrUnableToGetUserToken = "unable to get user token" ErrBadRequest = "incorrect request" ErrUnableToParseID = "unable to parse id" ErrUnableToGetUser = "unable to get user" ErrUnableToGetDiscriminator = "unable to get user discriminator" ErrUnableToModifyUser = "unable to modify user" ErrUnableToGetMember = "unable to get member" ErrUnableToGetRoles = "unable to get roles" ErrUnableToGetGuildByID = "unable to get guild by id" ErrUnableToGetGuilds = "unable to get guilds" ErrUnableToGetUserGuilds = "unable to get user guilds" ErrUnableToLeaveOwnServer = "unable to leave own guild" ErrUnableToRemoveMember = "unable to remove member" ErrUnableToParseRequestBody = "unable to parse request body" ErrUnableToCreateChannel = "unable to create channel" ErrUnableToCreateDMChannel = "unable to create dm channel" ErrUnableToGetChannel = "unable to get channel" ErrUnableToGetDMChannel = "unable to get dm channel" ErrUnableToGetGroupDMChannel = "unable to get group dm channel" ErrUnableToJoingGroupDmChannel = "unable to join group dm channel" // Validation error messages ErrUserNameTooShort = "user name must be at least 4 characters" ErrUserNameTooLong = "user name must be less than 20 characters" ErrAvatarIdInvalid = "avatar ID must be positive" ErrRecipientIdRequired = "recipient ID is required" ErrRecipientIdInvalid = "recipient ID must be positive" ErrChannelIdInvalid = "channel ID must be positive" ErrRecipientsRequired = "at least one recipient is required" ErrRecipientsInvalid = "recipient IDs must be positive" ErrTooManyRecipients = "maximum 10 recipients allowed" ErrNoFieldsToUpdate = "at least one field must be provided for update" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateDMManyRequest ¶
type CreateDMManyRequest struct {
ChannelId *int64 `json:"channel_id"`
RecipientsId []int64 `json:"recipients_id"`
}
func (CreateDMManyRequest) Validate ¶
func (r CreateDMManyRequest) Validate() error
type CreateDMRequest ¶
type CreateDMRequest struct {
RecipientId int64 `json:"recipient_id"`
}
func (CreateDMRequest) Validate ¶
func (r CreateDMRequest) Validate() error
type ModifyUserRequest ¶
type ModifyUserRequest struct {
Avatar *int64 `json:"avatar,omitempty" example:"2230469276416868352"` // Avatar ID.
Name *string `json:"name,omitempty" example:"NewFancyName"` // User name.
}
func (ModifyUserRequest) Validate ¶
func (r ModifyUserRequest) Validate() error
Click to show internal directories.
Click to hide internal directories.