Skip to content

Commit bd8b3d0

Browse files
authored
Clarity around the sender/receiver in ShouldDeliverCallback. (#1050)
## Changes <!-- Please summarize your changes. --> Elaborated on the sender/receiver structure of `TextChannel.ShouldDeliverCallback`. My co-worker got confused while he was working on a problem with us and thought the callback only gave you information about who sent the message, since in Play Solo you would be the only sender and recipient of the message. After confirming how I suspected it actually worked, I went in and made this documentation change so others hopefully don't have similar confusion in the future. <!-- Please link to any applicable information (forum posts, bug reports, etc.). --> ## Checks By submitting your pull request for review, you agree to the following: - [X] This contribution was created in whole or in part by me, and I have the right to submit it under the terms of this repository's open source licenses. - [X] I understand and agree that this contribution and a record of it are public, maintained indefinitely, and may be redistributed under the terms of this repository's open source licenses. - [X] To the best of my knowledge, all proposed changes are accurate. ---------
1 parent 4e58a26 commit bd8b3d0

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

content/en-us/reference/engine/classes/TextChannel.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,17 +293,23 @@ callbacks:
293293
returns anything else (including `nil`), the message won't be delivered to
294294
that client, although the sender will see the message regardless.
295295
296-
The sender can be referenced by `Class.TextChatMessage.TextSource`.
296+
The sender can be referenced by `Class.TextChatMessage.TextSource`,
297+
while the receiver is the `textSource` argument. Note that the sender
298+
and receiver can be the same, as the callback iterates through all possible
299+
receivers. In Roblox Studio, you will be the only sender and recipient of a
300+
message while in solo **Play** mode.
297301
code_samples: []
298302
parameters:
299303
- name: message
300304
type: TextChatMessage
301305
default:
302-
summary: ''
306+
summary: |
307+
The message being sent, which also contains the sender of the message.
303308
- name: textSource
304309
type: TextSource
305310
default:
306-
summary: ''
311+
summary: |
312+
The `Class.TextSource` of the user who will be receiving the message.
307313
returns:
308314
- type: Tuple
309315
summary: ''

0 commit comments

Comments
 (0)