Removed relatopmship constants, those are now in discordgo.
DELETE
internal/discordgoplus/constants.go
-package discordgoplus
-
-const (
- // RelationTypeFriend is an external constant for a relationship type
- // in discordgo.
- RelationTypeFriend = 1
- // RelationTypeBlocked is an external constant for a relationship type
- // in discordgo.
- RelationTypeBlocked = 2
- // RelationTypeIncommingRequest is an external constant for a relationship
- // type in discordgo.
- RelationTypeIncommingRequest = 3
- // RelationTypeOutgoingRequest is an external constant for a relationship
- // type in discordgo.
- RelationTypeOutgoingRequest = 4
-)

MODIFY
internal/ui/privatechats.go
internal/ui/privatechats.go
@@ -186,7 +186,7 @@ func (privateList *PrivateChatList) RemoveChannel(channel *discordgo.Channel) {
userID := channel.Recipients[0].ID
for _, relationship := range privateList.state.Relationships {
- if relationship.Type == discordgoplus.RelationTypeFriend &&
+ if relationship.Type == discordgo.RelationTypeFriend &&
relationship.User.ID == userID {
privateList.AddOrUpdateFriend(relationship.User)
break
@@ -253,7 +253,7 @@ func (privateList *PrivateChatList) Load() error {
FRIEND_LOOP:
for _, friend := range privateList.state.Relationships {
- if friend.Type != discordgoplus.RelationTypeFriend {
+ if friend.Type != discordgo.RelationTypeFriend {
continue
}

MODIFY
internal/ui/window.go
internal/ui/window.go
@@ -920,7 +920,7 @@ func (window *Window) registerPrivateChatsHandler() {
})
window.session.AddHandler(func(s *discordgo.Session, event *discordgo.RelationshipAdd) {
- if event.Relationship.Type == discordgoplus.RelationTypeFriend {
+ if event.Relationship.Type == discordgo.RelationTypeFriend {
window.app.QueueUpdateDraw(func() {
window.privateList.addFriend(event.User)
})
@@ -928,7 +928,7 @@ func (window *Window) registerPrivateChatsHandler() {
})
window.session.AddHandler(func(s *discordgo.Session, event *discordgo.RelationshipRemove) {
- if event.Relationship.Type == discordgoplus.RelationTypeFriend {
+ if event.Relationship.Type == discordgo.RelationTypeFriend {
window.app.QueueUpdateDraw(func() {
window.privateList.addFriend(event.User)
})

Removed relatopmship constants, those are now in discordgo.