Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit bc7d08d

Browse files
committed
Fix DMs, again
1 parent 63e3cbf commit bc7d08d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

discord/ext/slash/context.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ async def respond(
325325
path = f"/webhooks/{self.client.app_info.id}/{self.token}" \
326326
"/messages/@original"
327327
route = _Route('PATCH', path, channel_id=self.channel.id,
328-
guild_id=self.guild or self.guild.id)
328+
guild_id=self.guild and self.guild.id)
329329
else:
330330
# send a new response
331331
data = {
@@ -347,7 +347,7 @@ async def respond(
347347
data.setdefault('data', {})['flags'] = int(flags)
348348
path = f"/interactions/{self.id}/{self.token}/callback"
349349
route = _Route('POST', path, channel_id=self.channel.id,
350-
guild_id=self.guild or self.guild.id)
350+
guild_id=self.guild and self.guild.id)
351351
if isinstance(msg_data, list):
352352
# the payload json should have been finalized by now
353353
msg_data[0]['value'] = discord.utils.to_json(msg_data[0]['value'])
@@ -360,7 +360,7 @@ async def delete(self):
360360
path = f"/webhooks/{self.client.app_info.id}/{self.token}" \
361361
"/messages/@original"
362362
route = _Route('DELETE', path, channel_id=self.channel.id,
363-
guild_id=self.guild or self.guild.id)
363+
guild_id=self.guild and self.guild.id)
364364
await self.client.http.request(route)
365365

366366
async def send(self, *args, **kwargs):

0 commit comments

Comments
 (0)