Skip to content

Commit 28525c0

Browse files
authored
🎨 Improve the poll endpoint naming convention (#30)
* 🎨 Improve the poll endpoint naming convention * 🎨 Change `Endpoint::MESSAGE_POLL` to `protected`
1 parent db3e4cb commit 28525c0

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/Discord/Endpoint.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,6 @@ class Endpoint
8080
public const CHANNEL_THREADS_ARCHIVED_PRIVATE = self::CHANNEL_THREADS.'/archived/private';
8181
// GET
8282
public const CHANNEL_THREADS_ARCHIVED_PRIVATE_ME = self::CHANNEL.'/users/@me/threads/archived/private';
83-
// GET
84-
public const CHANNEL_POLLS = self::CHANNEL.'/polls';
85-
// GET
86-
public const CHANNEL_POLL = self::CHANNEL.'/polls/:message_id';
87-
// GET
88-
public const CHANNEL_POLL_ANSWERS = self::CHANNEL_POLL.'/answers/:answer_id';
89-
// POST
90-
public const CHANNEL_POLL_EXPIRE = self::CHANNEL_POLL.'/expire';
9183

9284
// GET, PATCH, DELETE
9385
public const THREAD = 'channels/:thread_id';
@@ -107,6 +99,13 @@ class Endpoint
10799
// DELETE
108100
public const USER_MESSAGE_REACTION = self::CHANNEL.'/messages/:message_id/reactions/:emoji/:user_id';
109101

102+
// GET
103+
protected const MESSAGE_POLL = self::CHANNEL.'/polls/:message_id';
104+
// GET
105+
public const MESSAGE_POLL_ANSWER = self::MESSAGE_POLL.'/answers/:answer_id';
106+
// POST
107+
public const MESSAGE_POLL_EXPIRE = self::MESSAGE_POLL.'/expire';
108+
110109
// GET, POST
111110
public const CHANNEL_WEBHOOKS = self::CHANNEL.'/webhooks';
112111

0 commit comments

Comments
 (0)