@@ -110,54 +110,23 @@ func gatewayHandlerPresenceUpdate(client bot.Client, sequenceNumber int, shardID
110
110
}
111
111
}
112
112
113
- // compare 2 discord.Activity and return true if they are different
114
113
func isActivityUpdated (old discord.Activity , new discord.Activity ) bool {
115
- if old .Name != new .Name {
116
- return true
117
- }
118
- if old .Type != new .Type {
119
- return true
120
- }
121
- if compareStringPtr (old .URL , new .URL ) {
122
- return true
123
- }
124
- if old .CreatedAt .Equal (new .CreatedAt ) {
125
- return true
126
- }
127
- if compareActivityTimestampsPtr (old .Timestamps , new .Timestamps ) {
128
- return true
129
- }
130
- if compareStringPtr (old .SyncID , new .SyncID ) {
131
- return true
132
- }
133
- if old .ApplicationID != new .ApplicationID {
134
- return true
135
- }
136
- if compareStringPtr (old .Details , new .Details ) {
137
- return true
138
- }
139
- if compareStringPtr (old .State , new .State ) {
140
- return true
141
- }
142
- if comparePartialEmojiPtr (old .Emoji , new .Emoji ) {
143
- return true
144
- }
145
- if compareActivityPartyPtr (old .Party , new .Party ) {
146
- return true
147
- }
148
- if compareActivityAssetsPtr (old .Assets , new .Assets ) {
149
- return true
150
- }
151
- if compareActivitySecretsPtr (old .Secrets , new .Secrets ) {
152
- return true
153
- }
154
- if compareBoolPtr (old .Instance , new .Instance ) {
155
- return true
156
- }
157
- if old .Flags != new .Flags {
158
- return true
159
- }
160
- return slices .Equal (old .Buttons , new .Buttons )
114
+ return old .Name != new .Name ||
115
+ old .Type != new .Type ||
116
+ compareStringPtr (old .URL , new .URL ) ||
117
+ old .CreatedAt .Equal (new .CreatedAt ) ||
118
+ compareActivityTimestampsPtr (old .Timestamps , new .Timestamps ) ||
119
+ compareStringPtr (old .SyncID , new .SyncID ) ||
120
+ old .ApplicationID != new .ApplicationID ||
121
+ compareStringPtr (old .Details , new .Details ) ||
122
+ compareStringPtr (old .State , new .State ) ||
123
+ comparePartialEmojiPtr (old .Emoji , new .Emoji ) ||
124
+ compareActivityPartyPtr (old .Party , new .Party ) ||
125
+ compareActivityAssetsPtr (old .Assets , new .Assets ) ||
126
+ compareActivitySecretsPtr (old .Secrets , new .Secrets ) ||
127
+ compareBoolPtr (old .Instance , new .Instance ) ||
128
+ old .Flags != new .Flags ||
129
+ slices .Equal (old .Buttons , new .Buttons )
161
130
}
162
131
163
132
func compareActivityTimestampsPtr (old * discord.ActivityTimestamps , new * discord.ActivityTimestamps ) bool {
0 commit comments