-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: add ChannelManager#createMessage()
#10559
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is missing an implementation in send()
. Just like reply
is an option there, there should be a forward
option.
Although, now that both reply
and forward
is there, maybe both should be removed in favour of messageReference
so we don't have to keep adding new message reference types (and thus new properties).
a55e642
to
1156836
Compare
7ae23ed
to
6f08f65
Compare
@@ -4309,6 +4310,7 @@ export abstract class MessageManager<InGuild extends boolean = boolean> extends | |||
public fetch(options: MessageResolvable | FetchMessageOptions): Promise<Message<InGuild>>; | |||
public fetch(options?: FetchMessagesOptions): Promise<Collection<Snowflake, Message<InGuild>>>; | |||
public fetchPinned(cache?: boolean): Promise<Collection<Snowflake, Message<InGuild>>>; | |||
public forward(reference: Omit<MessageReference, 'type'>): Promise<Message<InGuild>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels out of place in the manager...
- we don't have
create
- we don't have
reply
So we should either move create
/reply
into this manager, or drop this from here altogether. And I'm leaning more towards the former.. thoughts @discordjs/core?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we were to move anything at all, it'd probably just be create()
(replying and forwarding can happen within this method).
6f08f65
to
afbbc7d
Compare
715fdbe
to
bf2ac31
Compare
ChannelManager#createMessage()
Please describe the changes this PR makes and why it should be merged:
Moves the sending of messages from individual channels to ChannelManager.
BREAKING CHANGE:
MessageCreateOptions
no longer acceptsreply
. UsemessageReference
instead.BREAKING CHANGE:
TextBasedChannel#send()
has been removed. UseChannelManager#createMessage()
instead.BREAKING CHANGE:
Message#reply()
has been removed. UseChannelManager#createMessage()
instead.BREAKING CHANGE:
BaseChannel#isSendable()
has been removed.Status and versioning classification: