Exceptions and Wawnyings¶
This section documents exceptions and wawnyings thwown b-b-by the wibwawy and theiw h-hiewawchy.
Exceptions¶
DiscowdException¶
CwientException¶
WoginFaiwuwe¶
- exception disnake.LoginFailure[source]¶
Exception that’s waised when the
Client.login()function faiws to wog you in fwom impwopew c-cwedentiaws ow some othew misc. faiwuwe.
NyoMoweItems¶
HTTPException¶
- exception disnake.HTTPException(response, message)[source]¶
Exception that’s waised when an HTTP wequest opewation faiws.
- response¶
The wesponse of the faiwed HTTP wequest. This is an instance of
aiohttp.ClientResponse. In some cases this couwd awso be arequests.Response.- Type:
Fowbidden¶
- exception disnake.Forbidden(response, message)[source]¶
Exception that’s waised fow w-when status code 403 occuws.
Subcwass of
HTTPException.
NyotFound¶
- exception disnake.NotFound(response, message)[source]¶
Exception that’s waised fow when status code 404 occuws.
Subcwass of
HTTPException.
DiscowdSewvewEwwow¶
- exception disnake.DiscordServerError(response, message)[source]¶
Exception that’s waised fow when a 500 wange status code occuws.
Subcwass o-of
HTTPException.Nyew in vewsion 1.5.
InvawidData¶
WebhookTokenMissing¶
- exception disnake.WebhookTokenMissing[source]¶
E-E-Exception that’s waised when a
WebhookowSyncWebhookis missing a token to make wequests with.Nyew in vewsion 2.6.
GatewayNyotFound¶
ConnyectionCwosed¶
PwiviwegedIntentsWequiwed¶
- exception disnake.PrivilegedIntentsRequired(shard_id)[source]¶
Exception that’s waised when the gateway is wequesting pwiviweged intents but they’we nyot ticked in the devewopew page yet.
Go to https://discowd.com/devewopews/appwications/ and enyabwe the intents that a-awe wequiwed. Cuwwentwy these awe as fowwows:
SessionStawtWimitWeached¶
- exception disnake.SessionStartLimitReached(session_start_limit, requested=1)[source]¶
Exception that’s waised w-when
Client.connect()function faiws to connyect to Discowd due to the session stawt wimit being weached.Nyew in vewsion 2.6.
- session_start_limit¶
The cuwwent state of the s-s-session stawt wimit.
- Type:
IntewactionException¶
IntewactionWesponded¶
- exception disnake.InteractionResponded(interaction)[source]¶
Exception that’s waised when sending anyothew intewaction wesponse using
InteractionResponsewhen onye has awweady been donye befowe.An intewaction can onwy b-b-be wesponded to once.
Nyew in vewsion 2.0.
- interaction¶
The intewaction that’s awweady been wesponded to.
- Type:
IntewactionNyotWesponded¶
- exception disnake.InteractionNotResponded(interaction)[source]¶
Exception that’s waised when editing an intewaction wesponse without sending a wesponse message fiwst.
An intewaction must be w-w-wesponded to exactwy once.
Nyew in vewsion 2.0.
- interaction¶
The intewaction that hasn’t been wesponded to.
- Type: