disagreement 0.3.0b1__py3-none-any.whl → 0.4.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. disagreement/__init__.py +2 -4
  2. disagreement/audio.py +25 -5
  3. disagreement/cache.py +12 -3
  4. disagreement/caching.py +15 -14
  5. disagreement/client.py +86 -52
  6. disagreement/enums.py +10 -3
  7. disagreement/error_handler.py +5 -1
  8. disagreement/errors.py +1341 -3
  9. disagreement/event_dispatcher.py +1 -3
  10. disagreement/ext/__init__.py +1 -0
  11. disagreement/ext/app_commands/__init__.py +0 -2
  12. disagreement/ext/app_commands/commands.py +0 -2
  13. disagreement/ext/app_commands/context.py +0 -2
  14. disagreement/ext/app_commands/converters.py +2 -4
  15. disagreement/ext/app_commands/decorators.py +5 -7
  16. disagreement/ext/app_commands/handler.py +1 -3
  17. disagreement/ext/app_commands/hybrid.py +0 -2
  18. disagreement/ext/commands/__init__.py +0 -2
  19. disagreement/ext/commands/cog.py +0 -2
  20. disagreement/ext/commands/converters.py +16 -5
  21. disagreement/ext/commands/core.py +52 -14
  22. disagreement/ext/commands/decorators.py +3 -7
  23. disagreement/ext/commands/errors.py +0 -2
  24. disagreement/ext/commands/help.py +0 -2
  25. disagreement/ext/commands/view.py +1 -3
  26. disagreement/gateway.py +27 -25
  27. disagreement/http.py +264 -22
  28. disagreement/interactions.py +0 -2
  29. disagreement/models.py +199 -105
  30. disagreement/shard_manager.py +0 -2
  31. disagreement/ui/view.py +2 -2
  32. disagreement/voice_client.py +20 -1
  33. {disagreement-0.3.0b1.dist-info → disagreement-0.4.0.dist-info}/METADATA +32 -6
  34. disagreement-0.4.0.dist-info/RECORD +55 -0
  35. disagreement-0.3.0b1.dist-info/RECORD +0 -55
  36. {disagreement-0.3.0b1.dist-info → disagreement-0.4.0.dist-info}/WHEEL +0 -0
  37. {disagreement-0.3.0b1.dist-info → disagreement-0.4.0.dist-info}/licenses/LICENSE +0 -0
  38. {disagreement-0.3.0b1.dist-info → disagreement-0.4.0.dist-info}/top_level.txt +0 -0
disagreement/errors.py CHANGED
@@ -1,10 +1,8 @@
1
- # disagreement/errors.py
2
-
3
1
  """
4
2
  Custom exceptions for the Disagreement library.
5
3
  """
6
4
 
7
- from typing import Optional, Any # Add Optional and Any here
5
+ from typing import Optional, Any
8
6
 
9
7
 
10
8
  class DisagreementException(Exception):
@@ -92,6 +90,1346 @@ class Forbidden(HTTPException):
92
90
  pass
93
91
 
94
92
 
93
+ class GeneralError(HTTPException):
94
+ """General error (such as a malformed request body, amongst other things) (Code: 0)"""
95
+
96
+ pass
97
+
98
+
99
+ class UnknownAccount(HTTPException):
100
+ """Unknown account (Code: 10001)"""
101
+
102
+ pass
103
+
104
+
105
+ class UnknownApplication(HTTPException):
106
+ """Unknown application (Code: 10002)"""
107
+
108
+ pass
109
+
110
+
111
+ class UnknownChannel(HTTPException):
112
+ """Unknown channel (Code: 10003)"""
113
+
114
+ pass
115
+
116
+
117
+ class UnknownGuild(HTTPException):
118
+ """Unknown guild (Code: 10004)"""
119
+
120
+ pass
121
+
122
+
123
+ class UnknownIntegration(HTTPException):
124
+ """Unknown integration (Code: 10005)"""
125
+
126
+ pass
127
+
128
+
129
+ class UnknownInvite(HTTPException):
130
+ """Unknown invite (Code: 10006)"""
131
+
132
+ pass
133
+
134
+
135
+ class UnknownMember(HTTPException):
136
+ """Unknown member (Code: 10007)"""
137
+
138
+ pass
139
+
140
+
141
+ class UnknownMessage(HTTPException):
142
+ """Unknown message (Code: 10008)"""
143
+
144
+ pass
145
+
146
+
147
+ class UnknownPermissionOverwrite(HTTPException):
148
+ """Unknown permission overwrite (Code: 10009)"""
149
+
150
+ pass
151
+
152
+
153
+ class UnknownProvider(HTTPException):
154
+ """Unknown provider (Code: 10010)"""
155
+
156
+ pass
157
+
158
+
159
+ class UnknownRole(HTTPException):
160
+ """Unknown role (Code: 10011)"""
161
+
162
+ pass
163
+
164
+
165
+ class UnknownToken(HTTPException):
166
+ """Unknown token (Code: 10012)"""
167
+
168
+ pass
169
+
170
+
171
+ class UnknownUser(HTTPException):
172
+ """Unknown user (Code: 10013)"""
173
+
174
+ pass
175
+
176
+
177
+ class UnknownEmoji(HTTPException):
178
+ """Unknown emoji (Code: 10014)"""
179
+
180
+ pass
181
+
182
+
183
+ class UnknownWebhook(HTTPException):
184
+ """Unknown webhook (Code: 10015)"""
185
+
186
+ pass
187
+
188
+
189
+ class UnknownWebhookService(HTTPException):
190
+ """Unknown webhook service (Code: 10016)"""
191
+
192
+ pass
193
+
194
+
195
+ class UnknownSession(HTTPException):
196
+ """Unknown session (Code: 10020)"""
197
+
198
+ pass
199
+
200
+
201
+ class UnknownAsset(HTTPException):
202
+ """Unknown Asset (Code: 10021)"""
203
+
204
+ pass
205
+
206
+
207
+ class UnknownBan(HTTPException):
208
+ """Unknown ban (Code: 10026)"""
209
+
210
+ pass
211
+
212
+
213
+ class UnknownSKU(HTTPException):
214
+ """Unknown SKU (Code: 10027)"""
215
+
216
+ pass
217
+
218
+
219
+ class UnknownStoreListing(HTTPException):
220
+ """Unknown Store Listing (Code: 10028)"""
221
+
222
+ pass
223
+
224
+
225
+ class UnknownEntitlement(HTTPException):
226
+ """Unknown entitlement (Code: 10029)"""
227
+
228
+ pass
229
+
230
+
231
+ class UnknownBuild(HTTPException):
232
+ """Unknown build (Code: 10030)"""
233
+
234
+ pass
235
+
236
+
237
+ class UnknownLobby(HTTPException):
238
+ """Unknown lobby (Code: 10031)"""
239
+
240
+ pass
241
+
242
+
243
+ class UnknownBranch(HTTPException):
244
+ """Unknown branch (Code: 10032)"""
245
+
246
+ pass
247
+
248
+
249
+ class UnknownStoreDirectoryLayout(HTTPException):
250
+ """Unknown store directory layout (Code: 10033)"""
251
+
252
+ pass
253
+
254
+
255
+ class UnknownRedistributable(HTTPException):
256
+ """Unknown redistributable (Code: 10036)"""
257
+
258
+ pass
259
+
260
+
261
+ class UnknownGiftCode(HTTPException):
262
+ """Unknown gift code (Code: 10038)"""
263
+
264
+ pass
265
+
266
+
267
+ class UnknownStream(HTTPException):
268
+ """Unknown stream (Code: 10049)"""
269
+
270
+ pass
271
+
272
+
273
+ class UnknownPremiumServerSubscribeCooldown(HTTPException):
274
+ """Unknown premium server subscribe cooldown (Code: 10050)"""
275
+
276
+ pass
277
+
278
+
279
+ class UnknownGuildTemplate(HTTPException):
280
+ """Unknown guild template (Code: 10057)"""
281
+
282
+ pass
283
+
284
+
285
+ class UnknownDiscoverableServerCategory(HTTPException):
286
+ """Unknown discoverable server category (Code: 10059)"""
287
+
288
+ pass
289
+
290
+
291
+ class UnknownSticker(HTTPException):
292
+ """Unknown sticker (Code: 10060)"""
293
+
294
+ pass
295
+
296
+
297
+ class UnknownStickerPack(HTTPException):
298
+ """Unknown sticker pack (Code: 10061)"""
299
+
300
+ pass
301
+
302
+
303
+ class UnknownInteraction(HTTPException):
304
+ """Unknown interaction (Code: 10062)"""
305
+
306
+ pass
307
+
308
+
309
+ class UnknownApplicationCommand(HTTPException):
310
+ """Unknown application command (Code: 10063)"""
311
+
312
+ pass
313
+
314
+
315
+ class UnknownVoiceState(HTTPException):
316
+ """Unknown voice state (Code: 10065)"""
317
+
318
+ pass
319
+
320
+
321
+ class UnknownApplicationCommandPermissions(HTTPException):
322
+ """Unknown application command permissions (Code: 10066)"""
323
+
324
+ pass
325
+
326
+
327
+ class UnknownStageInstance(HTTPException):
328
+ """Unknown Stage Instance (Code: 10067)"""
329
+
330
+ pass
331
+
332
+
333
+ class UnknownGuildMemberVerificationForm(HTTPException):
334
+ """Unknown Guild Member Verification Form (Code: 10068)"""
335
+
336
+ pass
337
+
338
+
339
+ class UnknownGuildWelcomeScreen(HTTPException):
340
+ """Unknown Guild Welcome Screen (Code: 10069)"""
341
+
342
+ pass
343
+
344
+
345
+ class UnknownGuildScheduledEvent(HTTPException):
346
+ """Unknown Guild Scheduled Event (Code: 10070)"""
347
+
348
+ pass
349
+
350
+
351
+ class UnknownGuildScheduledEventUser(HTTPException):
352
+ """Unknown Guild Scheduled Event User (Code: 10071)"""
353
+
354
+ pass
355
+
356
+
357
+ class UnknownTag(HTTPException):
358
+ """Unknown Tag (Code: 10087)"""
359
+
360
+ pass
361
+
362
+
363
+ class UnknownSound(HTTPException):
364
+ """Unknown sound (Code: 10097)"""
365
+
366
+ pass
367
+
368
+
369
+ class BotsCannotUseThisEndpoint(HTTPException):
370
+ """Bots cannot use this endpoint (Code: 20001)"""
371
+
372
+ pass
373
+
374
+
375
+ class OnlyBotsCanUseThisEndpoint(HTTPException):
376
+ """Only bots can use this endpoint (Code: 20002)"""
377
+
378
+ pass
379
+
380
+
381
+ class ExplicitContentCannotBeSentToTheDesiredRecipients(HTTPException):
382
+ """Explicit content cannot be sent to the desired recipient(s) (Code: 20009)"""
383
+
384
+ pass
385
+
386
+
387
+ class NotAuthorizedToPerformThisActionOnThisApplication(HTTPException):
388
+ """You are not authorized to perform this action on this application (Code: 20012)"""
389
+
390
+ pass
391
+
392
+
393
+ class ActionCannotBePerformedDueToSlowmodeRateLimit(HTTPException):
394
+ """This action cannot be performed due to slowmode rate limit (Code: 20016)"""
395
+
396
+ pass
397
+
398
+
399
+ class OnlyTheOwnerOfThisAccountCanPerformThisAction(HTTPException):
400
+ """Only the owner of this account can perform this action (Code: 20018)"""
401
+
402
+ pass
403
+
404
+
405
+ class MessageCannotBeEditedDueToAnnouncementRateLimits(HTTPException):
406
+ """This message cannot be edited due to announcement rate limits (Code: 20022)"""
407
+
408
+ pass
409
+
410
+
411
+ class UnderMinimumAge(HTTPException):
412
+ """Under minimum age (Code: 20024)"""
413
+
414
+ pass
415
+
416
+
417
+ class ChannelHitWriteRateLimit(HTTPException):
418
+ """The channel you are writing has hit the write rate limit (Code: 20028)"""
419
+
420
+ pass
421
+
422
+
423
+ class ServerHitWriteRateLimit(HTTPException):
424
+ """The write action you are performing on the server has hit the write rate limit (Code: 20029)"""
425
+
426
+ pass
427
+
428
+
429
+ class DisallowedWordsInStageTopicOrNames(HTTPException):
430
+ """Your Stage topic, server name, server description, or channel names contain words that are not allowed (Code: 20031)"""
431
+
432
+ pass
433
+
434
+
435
+ class GuildPremiumSubscriptionLevelTooLow(HTTPException):
436
+ """Guild premium subscription level too low (Code: 20035)"""
437
+
438
+ pass
439
+
440
+
441
+ class MaximumNumberOfGuildsReached(HTTPException):
442
+ """Maximum number of guilds reached (100) (Code: 30001)"""
443
+
444
+ pass
445
+
446
+
447
+ class MaximumNumberOfFriendsReached(HTTPException):
448
+ """Maximum number of friends reached (1000) (Code: 30002)"""
449
+
450
+ pass
451
+
452
+
453
+ class MaximumNumberOfPinsReached(HTTPException):
454
+ """Maximum number of pins reached for the channel (50) (Code: 30003)"""
455
+
456
+ pass
457
+
458
+
459
+ class MaximumNumberOfRecipientsReached(HTTPException):
460
+ """Maximum number of recipients reached (10) (Code: 30004)"""
461
+
462
+ pass
463
+
464
+
465
+ class MaximumNumberOfGuildRolesReached(HTTPException):
466
+ """Maximum number of guild roles reached (250) (Code: 30005)"""
467
+
468
+ pass
469
+
470
+
471
+ class MaximumNumberOfWebhooksReached(HTTPException):
472
+ """Maximum number of webhooks reached (15) (Code: 30007)"""
473
+
474
+ pass
475
+
476
+
477
+ class MaximumNumberOfEmojisReached(HTTPException):
478
+ """Maximum number of emojis reached (Code: 30008)"""
479
+
480
+ pass
481
+
482
+
483
+ class MaximumNumberOfReactionsReached(HTTPException):
484
+ """Maximum number of reactions reached (20) (Code: 30010)"""
485
+
486
+ pass
487
+
488
+
489
+ class MaximumNumberOfGroupDMsReached(HTTPException):
490
+ """Maximum number of group DMs reached (10) (Code: 30011)"""
491
+
492
+ pass
493
+
494
+
495
+ class MaximumNumberOfGuildChannelsReached(HTTPException):
496
+ """Maximum number of guild channels reached (500) (Code: 30013)"""
497
+
498
+ pass
499
+
500
+
501
+ class MaximumNumberOfAttachmentsInAMessageReached(HTTPException):
502
+ """Maximum number of attachments in a message reached (10) (Code: 30015)"""
503
+
504
+ pass
505
+
506
+
507
+ class MaximumNumberOfInvitesReached(HTTPException):
508
+ """Maximum number of invites reached (1000) (Code: 30016)"""
509
+
510
+ pass
511
+
512
+
513
+ class MaximumNumberOfAnimatedEmojisReached(HTTPException):
514
+ """Maximum number of animated emojis reached (Code: 30018)"""
515
+
516
+ pass
517
+
518
+
519
+ class MaximumNumberOfServerMembersReached(HTTPException):
520
+ """Maximum number of server members reached (Code: 30019)"""
521
+
522
+ pass
523
+
524
+
525
+ class MaximumNumberOfServerCategoriesReached(HTTPException):
526
+ """Maximum number of server categories has been reached (5) (Code: 30030)"""
527
+
528
+ pass
529
+
530
+
531
+ class GuildAlreadyHasATemplate(HTTPException):
532
+ """Guild already has a template (Code: 30031)"""
533
+
534
+ pass
535
+
536
+
537
+ class MaximumNumberOfApplicationCommandsReached(HTTPException):
538
+ """Maximum number of application commands reached (Code: 30032)"""
539
+
540
+ pass
541
+
542
+
543
+ class MaximumNumberOfThreadParticipantsReached(HTTPException):
544
+ """Maximum number of thread participants has been reached (1000) (Code: 30033)"""
545
+
546
+ pass
547
+
548
+
549
+ class MaximumNumberOfDailyApplicationCommandCreatesReached(HTTPException):
550
+ """Maximum number of daily application command creates has been reached (200) (Code: 30034)"""
551
+
552
+ pass
553
+
554
+
555
+ class MaximumNumberOfBansForNonGuildMembersExceeded(HTTPException):
556
+ """Maximum number of bans for non-guild members have been exceeded (Code: 30035)"""
557
+
558
+ pass
559
+
560
+
561
+ class MaximumNumberOfBansFetchesReached(HTTPException):
562
+ """Maximum number of bans fetches has been reached (Code: 30037)"""
563
+
564
+ pass
565
+
566
+
567
+ class MaximumNumberOfUncompletedGuildScheduledEventsReached(HTTPException):
568
+ """Maximum number of uncompleted guild scheduled events reached (100) (Code: 30038)"""
569
+
570
+ pass
571
+
572
+
573
+ class MaximumNumberOfStickersReached(HTTPException):
574
+ """Maximum number of stickers reached (Code: 30039)"""
575
+
576
+ pass
577
+
578
+
579
+ class MaximumNumberOfPruneRequestsReached(HTTPException):
580
+ """Maximum number of prune requests has been reached. Try again later (Code: 30040)"""
581
+
582
+ pass
583
+
584
+
585
+ class MaximumNumberOfGuildWidgetSettingsUpdatesReached(HTTPException):
586
+ """Maximum number of guild widget settings updates has been reached. Try again later (Code: 30042)"""
587
+
588
+ pass
589
+
590
+
591
+ class MaximumNumberOfSoundboardSoundsReached(HTTPException):
592
+ """Maximum number of soundboard sounds reached (Code: 30045)"""
593
+
594
+ pass
595
+
596
+
597
+ class MaximumNumberOfEditsToMessagesOlderThan1HourReached(HTTPException):
598
+ """Maximum number of edits to messages older than 1 hour reached. Try again later (Code: 30046)"""
599
+
600
+ pass
601
+
602
+
603
+ class MaximumNumberOfPinnedThreadsInAForumChannelReached(HTTPException):
604
+ """Maximum number of pinned threads in a forum channel has been reached (Code: 30047)"""
605
+
606
+ pass
607
+
608
+
609
+ class MaximumNumberOfTagsInAForumChannelReached(HTTPException):
610
+ """Maximum number of tags in a forum channel has been reached (Code: 30048)"""
611
+
612
+ pass
613
+
614
+
615
+ class BitrateIsTooHighForChannelOfThisType(HTTPException):
616
+ """Bitrate is too high for channel of this type (Code: 30052)"""
617
+
618
+ pass
619
+
620
+
621
+ class MaximumNumberOfPremiumEmojisReached(HTTPException):
622
+ """Maximum number of premium emojis reached (25) (Code: 30056)"""
623
+
624
+ pass
625
+
626
+
627
+ class MaximumNumberOfWebhooksPerGuildReached(HTTPException):
628
+ """Maximum number of webhooks per guild reached (1000) (Code: 30058)"""
629
+
630
+ pass
631
+
632
+
633
+ class MaximumNumberOfChannelPermissionOverwritesReached(HTTPException):
634
+ """Maximum number of channel permission overwrites reached (1000) (Code: 30061)"""
635
+
636
+ pass
637
+
638
+
639
+ class TheChannelsForThisGuildAreTooLarge(HTTPException):
640
+ """The channels for this guild are too large (Code: 30061)"""
641
+
642
+ pass
643
+
644
+
645
+ class Unauthorized(HTTPException):
646
+ """Unauthorized. Provide a valid token and try again (Code: 40001)"""
647
+
648
+ pass
649
+
650
+
651
+ class YouNeedToVerifyYourAccount(HTTPException):
652
+ """You need to verify your account in order to perform this action (Code: 40002)"""
653
+
654
+ pass
655
+
656
+
657
+ class YouAreOpeningDirectMessagesTooFast(HTTPException):
658
+ """You are opening direct messages too fast (Code: 40003)"""
659
+
660
+ pass
661
+
662
+
663
+ class SendMessagesHasBeenTemporarilyDisabled(HTTPException):
664
+ """Send messages has been temporarily disabled (Code: 40004)"""
665
+
666
+ pass
667
+
668
+
669
+ class RequestEntityTooLarge(HTTPException):
670
+ """Request entity too large. Try sending something smaller in size (Code: 40005)"""
671
+
672
+ pass
673
+
674
+
675
+ class ThisFeatureHasBeenTemporarilyDisabledServerSide(HTTPException):
676
+ """This feature has been temporarily disabled server-side (Code: 40006)"""
677
+
678
+ pass
679
+
680
+
681
+ class TheUserIsBannedFromThisGuild(HTTPException):
682
+ """The user is banned from this guild (Code: 40007)"""
683
+
684
+ pass
685
+
686
+
687
+ class ConnectionHasBeenRevoked(HTTPException):
688
+ """Connection has been revoked (Code: 40012)"""
689
+
690
+ pass
691
+
692
+
693
+ class OnlyConsumableSKUsCanBeConsumed(HTTPException):
694
+ """Only consumable SKUs can be consumed (Code: 40018)"""
695
+
696
+ pass
697
+
698
+
699
+ class YouCanOnlyDeleteSandboxEntitlements(HTTPException):
700
+ """You can only delete sandbox entitlements. (Code: 40019)"""
701
+
702
+ pass
703
+
704
+
705
+ class TargetUserIsNotConnectedToVoice(HTTPException):
706
+ """Target user is not connected to voice (Code: 40032)"""
707
+
708
+ pass
709
+
710
+
711
+ class ThisMessageHasAlreadyBeenCrossposted(HTTPException):
712
+ """This message has already been crossposted (Code: 40033)"""
713
+
714
+ pass
715
+
716
+
717
+ class AnApplicationCommandWithThatNameAlreadyExists(HTTPException):
718
+ """An application command with that name already exists (Code: 40041)"""
719
+
720
+ pass
721
+
722
+
723
+ class ApplicationInteractionFailedToSend(HTTPException):
724
+ """Application interaction failed to send (Code: 40043)"""
725
+
726
+ pass
727
+
728
+
729
+ class CannotSendAMessageInAForumChannel(HTTPException):
730
+ """Cannot send a message in a forum channel (Code: 40058)"""
731
+
732
+ pass
733
+
734
+
735
+ class InteractionHasAlreadyBeenAcknowledged(HTTPException):
736
+ """Interaction has already been acknowledged (Code: 40060)"""
737
+
738
+ pass
739
+
740
+
741
+ class TagNamesMustBeUnique(HTTPException):
742
+ """Tag names must be unique (Code: 40061)"""
743
+
744
+ pass
745
+
746
+
747
+ class ServiceResourceIsBeingRateLimited(HTTPException):
748
+ """Service resource is being rate limited (Code: 40062)"""
749
+
750
+ pass
751
+
752
+
753
+ class ThereAreNoTagsAvailableThatCanBeSetByNonModerators(HTTPException):
754
+ """There are no tags available that can be set by non-moderators (Code: 40066)"""
755
+
756
+ pass
757
+
758
+
759
+ class ATagIsRequiredToCreateAForumPostInThisChannel(HTTPException):
760
+ """A tag is required to create a forum post in this channel (Code: 40067)"""
761
+
762
+ pass
763
+
764
+
765
+ class AnEntitlementHasAlreadyBeenGrantedForThisResource(HTTPException):
766
+ """An entitlement has already been granted for this resource (Code: 40074)"""
767
+
768
+ pass
769
+
770
+
771
+ class ThisInteractionHasHitTheMaximumNumberOfFollowUpMessages(HTTPException):
772
+ """This interaction has hit the maximum number of follow up messages (Code: 40094)"""
773
+
774
+ pass
775
+
776
+
777
+ class CloudflareIsBlockingYourRequest(HTTPException):
778
+ """Cloudflare is blocking your request. This can often be resolved by setting a proper User Agent (Code: 40333)"""
779
+
780
+ pass
781
+
782
+
783
+ class MissingAccess(HTTPException):
784
+ """Missing access (Code: 50001)"""
785
+
786
+ pass
787
+
788
+
789
+ class InvalidAccountType(HTTPException):
790
+ """Invalid account type (Code: 50002)"""
791
+
792
+ pass
793
+
794
+
795
+ class CannotExecuteActionOnADMChannel(HTTPException):
796
+ """Cannot execute action on a DM channel (Code: 50003)"""
797
+
798
+ pass
799
+
800
+
801
+ class GuildWidgetDisabled(HTTPException):
802
+ """Guild widget disabled (Code: 50004)"""
803
+
804
+ pass
805
+
806
+
807
+ class CannotEditAMessageAuthoredByAnotherUser(HTTPException):
808
+ """Cannot edit a message authored by another user (Code: 50005)"""
809
+
810
+ pass
811
+
812
+
813
+ class CannotSendAnEmptyMessage(HTTPException):
814
+ """Cannot send an empty message (Code: 50006)"""
815
+
816
+ pass
817
+
818
+
819
+ class CannotSendMessagesToThisUser(HTTPException):
820
+ """Cannot send messages to this user (Code: 50007)"""
821
+
822
+ pass
823
+
824
+
825
+ class CannotSendMessagesInANonTextChannel(HTTPException):
826
+ """Cannot send messages in a non-text channel (Code: 50008)"""
827
+
828
+ pass
829
+
830
+
831
+ class ChannelVerificationLevelIsTooHighForYouToGainAccess(HTTPException):
832
+ """Channel verification level is too high for you to gain access (Code: 50009)"""
833
+
834
+ pass
835
+
836
+
837
+ class OAuth2ApplicationDoesNotHaveABot(HTTPException):
838
+ """OAuth2 application does not have a bot (Code: 50010)"""
839
+
840
+ pass
841
+
842
+
843
+ class OAuth2ApplicationLimitReached(HTTPException):
844
+ """OAuth2 application limit reached (Code: 50011)"""
845
+
846
+ pass
847
+
848
+
849
+ class InvalidOAuth2State(HTTPException):
850
+ """Invalid OAuth2 state (Code: 50012)"""
851
+
852
+ pass
853
+
854
+
855
+ class YouLackPermissionsToPerformThatAction(HTTPException):
856
+ """You lack permissions to perform that action (Code: 50013)"""
857
+
858
+ pass
859
+
860
+
861
+ class InvalidAuthenticationTokenProvided(HTTPException):
862
+ """Invalid authentication token provided (Code: 50014)"""
863
+
864
+ pass
865
+
866
+
867
+ class NoteWasTooLong(HTTPException):
868
+ """Note was too long (Code: 50015)"""
869
+
870
+ pass
871
+
872
+
873
+ class ProvidedTooFewOrTooManyMessagesToDelete(HTTPException):
874
+ """Provided too few or too many messages to delete. Must provide at least 2 and fewer than 100 messages to delete (Code: 50016)"""
875
+
876
+ pass
877
+
878
+
879
+ class InvalidMFALevel(HTTPException):
880
+ """Invalid MFA Level (Code: 50017)"""
881
+
882
+ pass
883
+
884
+
885
+ class AMessageCanOnlyBePinnedToTheChannelItWasSentIn(HTTPException):
886
+ """A message can only be pinned to the channel it was sent in (Code: 50019)"""
887
+
888
+ pass
889
+
890
+
891
+ class InviteCodeWasEitherInvalidOrTaken(HTTPException):
892
+ """Invite code was either invalid or taken (Code: 50020)"""
893
+
894
+ pass
895
+
896
+
897
+ class CannotExecuteActionOnASystemMessage(HTTPException):
898
+ """Cannot execute action on a system message (Code: 50021)"""
899
+
900
+ pass
901
+
902
+
903
+ class CannotExecuteActionOnThisChannelType(HTTPException):
904
+ """Cannot execute action on this channel type (Code: 50024)"""
905
+
906
+ pass
907
+
908
+
909
+ class InvalidOAuth2AccessTokenProvided(HTTPException):
910
+ """Invalid OAuth2 access token provided (Code: 50025)"""
911
+
912
+ pass
913
+
914
+
915
+ class MissingRequiredOAuth2Scope(HTTPException):
916
+ """Missing required OAuth2 scope (Code: 50026)"""
917
+
918
+ pass
919
+
920
+
921
+ class InvalidWebhookTokenProvided(HTTPException):
922
+ """Invalid webhook token provided (Code: 50027)"""
923
+
924
+ pass
925
+
926
+
927
+ class InvalidRole(HTTPException):
928
+ """Invalid role (Code: 50028)"""
929
+
930
+ pass
931
+
932
+
933
+ class InvalidRecipients(HTTPException):
934
+ """Invalid Recipient(s) (Code: 50033)"""
935
+
936
+ pass
937
+
938
+
939
+ class AMessageProvidedWasTooOldToBulkDelete(HTTPException):
940
+ """A message provided was too old to bulk delete (Code: 50034)"""
941
+
942
+ pass
943
+
944
+
945
+ class InvalidFormBody(HTTPException):
946
+ """Invalid form body (returned for both application/json and multipart/form-data bodies), or invalid Content-Type provided (Code: 50035)"""
947
+
948
+ pass
949
+
950
+
951
+ class AnInviteWasAcceptedToAGuildTheApplicationBotIsNotIn(HTTPException):
952
+ """An invite was accepted to a guild the application's bot is not in (Code: 50036)"""
953
+
954
+ pass
955
+
956
+
957
+ class InvalidActivityAction(HTTPException):
958
+ """Invalid Activity Action (Code: 50039)"""
959
+
960
+ pass
961
+
962
+
963
+ class InvalidAPIVersionProvided(HTTPException):
964
+ """Invalid API version provided (Code: 50041)"""
965
+
966
+ pass
967
+
968
+
969
+ class FileUploadedExceedsTheMaximumSize(HTTPException):
970
+ """File uploaded exceeds the maximum size (Code: 50045)"""
971
+
972
+ pass
973
+
974
+
975
+ class InvalidFileUploaded(HTTPException):
976
+ """Invalid file uploaded (Code: 50046)"""
977
+
978
+ pass
979
+
980
+
981
+ class CannotSelfRedeemThisGift(HTTPException):
982
+ """Cannot self-redeem this gift (Code: 50054)"""
983
+
984
+ pass
985
+
986
+
987
+ class InvalidGuild(HTTPException):
988
+ """Invalid Guild (Code: 50055)"""
989
+
990
+ pass
991
+
992
+
993
+ class InvalidSKU(HTTPException):
994
+ """Invalid SKU (Code: 50057)"""
995
+
996
+ pass
997
+
998
+
999
+ class InvalidRequestOrigin(HTTPException):
1000
+ """Invalid request origin (Code: 50067)"""
1001
+
1002
+ pass
1003
+
1004
+
1005
+ class InvalidMessageType(HTTPException):
1006
+ """Invalid message type (Code: 50068)"""
1007
+
1008
+ pass
1009
+
1010
+
1011
+ class PaymentSourceRequiredToRedeemGift(HTTPException):
1012
+ """Payment source required to redeem gift (Code: 50070)"""
1013
+
1014
+ pass
1015
+
1016
+
1017
+ class CannotModifyASystemWebhook(HTTPException):
1018
+ """Cannot modify a system webhook (Code: 50073)"""
1019
+
1020
+ pass
1021
+
1022
+
1023
+ class CannotDeleteAChannelRequiredForCommunityGuilds(HTTPException):
1024
+ """Cannot delete a channel required for Community guilds (Code: 50074)"""
1025
+
1026
+ pass
1027
+
1028
+
1029
+ class CannotEditStickersWithinAMessage(HTTPException):
1030
+ """Cannot edit stickers within a message (Code: 50080)"""
1031
+
1032
+ pass
1033
+
1034
+
1035
+ class InvalidStickerSent(HTTPException):
1036
+ """Invalid sticker sent (Code: 50081)"""
1037
+
1038
+ pass
1039
+
1040
+
1041
+ class TriedToPerformAnOperationOnAnArchivedThread(HTTPException):
1042
+ """Tried to perform an operation on an archived thread, such as editing a message or adding a user to the thread (Code: 50083)"""
1043
+
1044
+ pass
1045
+
1046
+
1047
+ class InvalidThreadNotificationSettings(HTTPException):
1048
+ """Invalid thread notification settings (Code: 50085)"""
1049
+
1050
+ pass
1051
+
1052
+
1053
+ class BeforeValueIsEarlierThanTheThreadCreationDate(HTTPException):
1054
+ """before value is earlier than the thread creation date (Code: 50086)"""
1055
+
1056
+ pass
1057
+
1058
+
1059
+ class CommunityServerChannelsMustBeTextChannels(HTTPException):
1060
+ """Community server channels must be text channels (Code: 50086)"""
1061
+
1062
+ pass
1063
+
1064
+
1065
+ class TheEntityTypeOfTheEventIsDifferentFromTheEntityYouAreTryingToStartTheEventFor(
1066
+ HTTPException
1067
+ ):
1068
+ """The entity type of the event is different from the entity you are trying to start the event for (Code: 50091)"""
1069
+
1070
+ pass
1071
+
1072
+
1073
+ class ThisServerIsNotAvailableInYourLocation(HTTPException):
1074
+ """This server is not available in your location (Code: 50095)"""
1075
+
1076
+ pass
1077
+
1078
+
1079
+ class ThisServerNeedsMonetizationEnabledInOrderToPerformThisAction(HTTPException):
1080
+ """This server needs monetization enabled in order to perform this action (Code: 50097)"""
1081
+
1082
+ pass
1083
+
1084
+
1085
+ class ThisServerNeedsMoreBoostsToPerformThisAction(HTTPException):
1086
+ """This server needs more boosts to perform this action (Code: 50101)"""
1087
+
1088
+ pass
1089
+
1090
+
1091
+ class TheRequestBodyContainsInvalidJSON(HTTPException):
1092
+ """The request body contains invalid JSON. (Code: 50109)"""
1093
+
1094
+ pass
1095
+
1096
+
1097
+ class TheProvidedFileIsInvalid(HTTPException):
1098
+ """The provided file is invalid. (Code: 50110)"""
1099
+
1100
+ pass
1101
+
1102
+
1103
+ class TheProvidedFileTypeIsInvalid(HTTPException):
1104
+ """The provided file type is invalid. (Code: 50123)"""
1105
+
1106
+ pass
1107
+
1108
+
1109
+ class TheProvidedFileDurationExceedsMaximumOf52Seconds(HTTPException):
1110
+ """The provided file duration exceeds maximum of 5.2 seconds. (Code: 50124)"""
1111
+
1112
+ pass
1113
+
1114
+
1115
+ class OwnerCannotBePendingMember(HTTPException):
1116
+ """Owner cannot be pending member (Code: 50131)"""
1117
+
1118
+ pass
1119
+
1120
+
1121
+ class OwnershipCannotBeTransferredToABotUser(HTTPException):
1122
+ """Ownership cannot be transferred to a bot user (Code: 50132)"""
1123
+
1124
+ pass
1125
+
1126
+
1127
+ class FailedToResizeAssetBelowTheMaximumSize(HTTPException):
1128
+ """Failed to resize asset below the maximum size: 262144 (Code: 50138)"""
1129
+
1130
+ pass
1131
+
1132
+
1133
+ class CannotMixSubscriptionAndNonSubscriptionRolesForAnEmoji(HTTPException):
1134
+ """Cannot mix subscription and non subscription roles for an emoji (Code: 50144)"""
1135
+
1136
+ pass
1137
+
1138
+
1139
+ class CannotConvertBetweenPremiumEmojiAndNormalEmoji(HTTPException):
1140
+ """Cannot convert between premium emoji and normal emoji (Code: 50145)"""
1141
+
1142
+ pass
1143
+
1144
+
1145
+ class UploadedFileNotFound(HTTPException):
1146
+ """Uploaded file not found. (Code: 50146)"""
1147
+
1148
+ pass
1149
+
1150
+
1151
+ class TheSpecifiedEmojiIsInvalid(HTTPException):
1152
+ """The specified emoji is invalid (Code: 50151)"""
1153
+
1154
+ pass
1155
+
1156
+
1157
+ class VoiceMessagesDoNotSupportAdditionalContent(HTTPException):
1158
+ """Voice messages do not support additional content. (Code: 50159)"""
1159
+
1160
+ pass
1161
+
1162
+
1163
+ class VoiceMessagesMustHaveASingleAudioAttachment(HTTPException):
1164
+ """Voice messages must have a single audio attachment. (Code: 50160)"""
1165
+
1166
+ pass
1167
+
1168
+
1169
+ class VoiceMessagesMustHaveSupportingMetadata(HTTPException):
1170
+ """Voice messages must have supporting metadata. (Code: 50161)"""
1171
+
1172
+ pass
1173
+
1174
+
1175
+ class VoiceMessagesCannotBeEdited(HTTPException):
1176
+ """Voice messages cannot be edited. (Code: 50162)"""
1177
+
1178
+ pass
1179
+
1180
+
1181
+ class CannotDeleteGuildSubscriptionIntegration(HTTPException):
1182
+ """Cannot delete guild subscription integration (Code: 50163)"""
1183
+
1184
+ pass
1185
+
1186
+
1187
+ class YouCannotSendVoiceMessagesInThisChannel(HTTPException):
1188
+ """You cannot send voice messages in this channel. (Code: 50173)"""
1189
+
1190
+ pass
1191
+
1192
+
1193
+ class TheUserAccountMustFirstBeVerified(HTTPException):
1194
+ """The user account must first be verified (Code: 50178)"""
1195
+
1196
+ pass
1197
+
1198
+
1199
+ class TheProvidedFileDoesNotHaveAValidDuration(HTTPException):
1200
+ """The provided file does not have a valid duration. (Code: 50192)"""
1201
+
1202
+ pass
1203
+
1204
+
1205
+ class YouDoNotHavePermissionToSendThisSticker(HTTPException):
1206
+ """You do not have permission to send this sticker. (Code: 50600)"""
1207
+
1208
+ pass
1209
+
1210
+
1211
+ class TwoFactorIsRequiredForThisOperation(HTTPException):
1212
+ """Two factor is required for this operation (Code: 60003)"""
1213
+
1214
+ pass
1215
+
1216
+
1217
+ class NoUsersWithDiscordTagExist(HTTPException):
1218
+ """No users with DiscordTag exist (Code: 80004)"""
1219
+
1220
+ pass
1221
+
1222
+
1223
+ class ReactionWasBlocked(HTTPException):
1224
+ """Reaction was blocked (Code: 90001)"""
1225
+
1226
+ pass
1227
+
1228
+
1229
+ class UserCannotUseBurstReactions(HTTPException):
1230
+ """User cannot use burst reactions (Code: 90002)"""
1231
+
1232
+ pass
1233
+
1234
+
1235
+ class ApplicationNotYetAvailable(HTTPException):
1236
+ """Application not yet available. Try again later (Code: 110001)"""
1237
+
1238
+ pass
1239
+
1240
+
1241
+ class APIResourceIsCurrentlyOverloaded(HTTPException):
1242
+ """API resource is currently overloaded. Try again a little later (Code: 130000)"""
1243
+
1244
+ pass
1245
+
1246
+
1247
+ class TheStageIsAlreadyOpen(HTTPException):
1248
+ """The Stage is already open (Code: 150006)"""
1249
+
1250
+ pass
1251
+
1252
+
1253
+ class CannotReplyWithoutPermissionToReadMessageHistory(HTTPException):
1254
+ """Cannot reply without permission to read message history (Code: 160002)"""
1255
+
1256
+ pass
1257
+
1258
+
1259
+ class AThreadHasAlreadyBeenCreatedForThisMessage(HTTPException):
1260
+ """A thread has already been created for this message (Code: 160004)"""
1261
+
1262
+ pass
1263
+
1264
+
1265
+ class ThreadIsLocked(HTTPException):
1266
+ """Thread is locked (Code: 160005)"""
1267
+
1268
+ pass
1269
+
1270
+
1271
+ class MaximumNumberOfActiveThreadsReached(HTTPException):
1272
+ """Maximum number of active threads reached (Code: 160006)"""
1273
+
1274
+ pass
1275
+
1276
+
1277
+ class MaximumNumberOfActiveAnnouncementThreadsReached(HTTPException):
1278
+ """Maximum number of active announcement threads reached (Code: 160007)"""
1279
+
1280
+ pass
1281
+
1282
+
1283
+ class InvalidJSONForUploadedLottieFile(HTTPException):
1284
+ """Invalid JSON for uploaded Lottie file (Code: 170001)"""
1285
+
1286
+ pass
1287
+
1288
+
1289
+ class UploadedLottiesCannotContainRasterizedImages(HTTPException):
1290
+ """Uploaded Lotties cannot contain rasterized images such as PNG or JPEG (Code: 170002)"""
1291
+
1292
+ pass
1293
+
1294
+
1295
+ class StickerMaximumFramerateExceeded(HTTPException):
1296
+ """Sticker maximum framerate exceeded (Code: 170003)"""
1297
+
1298
+ pass
1299
+
1300
+
1301
+ class StickerFrameCountExceedsMaximumOf1000Frames(HTTPException):
1302
+ """Sticker frame count exceeds maximum of 1000 frames (Code: 170004)"""
1303
+
1304
+ pass
1305
+
1306
+
1307
+ class LottieAnimationMaximumDimensionsExceeded(HTTPException):
1308
+ """Lottie animation maximum dimensions exceeded (Code: 170005)"""
1309
+
1310
+ pass
1311
+
1312
+
1313
+ class StickerFrameRateIsEitherTooSmallOrTooLarge(HTTPException):
1314
+ """Sticker frame rate is either too small or too large (Code: 170006)"""
1315
+
1316
+ pass
1317
+
1318
+
1319
+ class StickerAnimationDurationExceedsMaximumOf5Seconds(HTTPException):
1320
+ """Sticker animation duration exceeds maximum of 5 seconds (Code: 170007)"""
1321
+
1322
+ pass
1323
+
1324
+
1325
+ class CannotUpdateAFinishedEvent(HTTPException):
1326
+ """Cannot update a finished event (Code: 180000)"""
1327
+
1328
+ pass
1329
+
1330
+
1331
+ class FailedToCreateStageNeededForStageEvent(HTTPException):
1332
+ """Failed to create stage needed for stage event (Code: 180002)"""
1333
+
1334
+ pass
1335
+
1336
+
1337
+ class MessageWasBlockedByAutomaticModeration(HTTPException):
1338
+ """Message was blocked by automatic moderation (Code: 200000)"""
1339
+
1340
+ pass
1341
+
1342
+
1343
+ class TitleWasBlockedByAutomaticModeration(HTTPException):
1344
+ """Title was blocked by automatic moderation (Code: 200001)"""
1345
+
1346
+ pass
1347
+
1348
+
1349
+ class WebhooksPostedToForumChannelsMustHaveAThreadNameOrThreadId(HTTPException):
1350
+ """Webhooks posted to forum channels must have a thread_name or thread_id (Code: 220001)"""
1351
+
1352
+ pass
1353
+
1354
+
1355
+ class WebhooksPostedToForumChannelsCannotHaveBothAThreadNameAndThreadId(HTTPException):
1356
+ """Webhooks posted to forum channels cannot have both a thread_name and thread_id (Code: 220002)"""
1357
+
1358
+ pass
1359
+
1360
+
1361
+ class WebhooksCanOnlyCreateThreadsInForumChannels(HTTPException):
1362
+ """Webhooks can only create threads in forum channels (Code: 220003)"""
1363
+
1364
+ pass
1365
+
1366
+
1367
+ class WebhookServicesCannotBeUsedInForumChannels(HTTPException):
1368
+ """Webhook services cannot be used in forum channels (Code: 220004)"""
1369
+
1370
+ pass
1371
+
1372
+
1373
+ class MessageBlockedByHarmfulLinksFilter(HTTPException):
1374
+ """Message blocked by harmful links filter (Code: 240000)"""
1375
+
1376
+ pass
1377
+
1378
+
1379
+ class CannotEnableOnboardingRequirementsAreNotMet(HTTPException):
1380
+ """Cannot enable onboarding, requirements are not met (Code: 350000)"""
1381
+
1382
+ pass
1383
+
1384
+
1385
+ class CannotUpdateOnboardingWhileBelowRequirements(HTTPException):
1386
+ """Cannot update onboarding while below requirements (Code: 350001)"""
1387
+
1388
+ pass
1389
+
1390
+
1391
+ class FailedToBanUsers(HTTPException):
1392
+ """Failed to ban users (Code: 500000)"""
1393
+
1394
+ pass
1395
+
1396
+
1397
+ class PollVotingBlocked(HTTPException):
1398
+ """Poll voting blocked (Code: 520000)"""
1399
+
1400
+ pass
1401
+
1402
+
1403
+ class PollExpired(HTTPException):
1404
+ """Poll expired (Code: 520001)"""
1405
+
1406
+ pass
1407
+
1408
+
1409
+ class InvalidChannelTypeForPollCreation(HTTPException):
1410
+ """Invalid channel type for poll creation (Code: 520002)"""
1411
+
1412
+ pass
1413
+
1414
+
1415
+ class CannotEditAPollMessage(HTTPException):
1416
+ """Cannot edit a poll message (Code: 520003)"""
1417
+
1418
+ pass
1419
+
1420
+
1421
+ class CannotUseAnEmojiIncludedWithThePoll(HTTPException):
1422
+ """Cannot use an emoji included with the poll (Code: 520004)"""
1423
+
1424
+ pass
1425
+
1426
+
1427
+ class CannotExpireANonPollMessage(HTTPException):
1428
+ """Cannot expire a non-poll message (Code: 520006)"""
1429
+
1430
+ pass
1431
+
1432
+
95
1433
  class AppCommandError(DisagreementException):
96
1434
  """Base exception for application command related errors."""
97
1435