-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Expand file tree
/
Copy pathTextChatCommand.yaml
More file actions
148 lines (142 loc) · 4.47 KB
/
TextChatCommand.yaml
File metadata and controls
148 lines (142 loc) · 4.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: TextChatCommand
type: class
category:
memory_category: Instances
summary: |
Represents a text chat command.
description: |
Represents a text chat command. Can be used to create custom text chat
commands when parented to `Class.TextChatService`. Custom commands can have up
to two aliases, and the Triggered event fires when a user types
"/{PrimaryAlias}" or "/{SecondaryAlias}" into the chat. For examples of
creating custom text chat commands, see [Custom Text Chat Commands](../../../chat/examples/custom-text-chat-commands)
To learn more about using `Class.TextChatService`, see
[In-Experience Text Chat](../../../chat/in-experience-text-chat.md).
code_samples: []
inherits:
- Instance
tags: []
deprecation_message: ''
properties:
- name: TextChatCommand.AutocompleteVisible
summary: ''
description: ''
code_samples: []
type: bool
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Behavior
serialization:
can_load: true
can_save: true
capabilities:
- Chat
writeCapabilities: []
- name: TextChatCommand.Enabled
summary: |
Determines whether the `Class.TextChatCommand` is enabled.
description: |
Determines whether the `Class.TextChatCommand` is enabled.
When disabled, messages that match "/{PrimaryAlias}" or
"/{SecondaryAlias}" is not sunk and is sent to other users.
Use this to disable default commands on a case-by-case basis.
code_samples: []
type: bool
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Behavior
serialization:
can_load: true
can_save: true
capabilities:
- Chat
writeCapabilities: []
- name: TextChatCommand.PrimaryAlias
summary: |
A primary alias used to trigger the `Class.TextChatCommand`.
description: |
A primary alias used to trigger the `Class.TextChatCommand`.
If a user sends a message with `Class.TextChannel:SendAsync()` that
matches "/{`Class.TextChatCommand.PrimaryAlias`}", then the message is not
sent and instead `Class.TextChatCommand.Triggered` is fired.
code_samples: []
type: string
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Behavior
serialization:
can_load: true
can_save: true
capabilities:
- Chat
writeCapabilities: []
- name: TextChatCommand.SecondaryAlias
summary: |
A secondary alias used to trigger the `Class.TextChatCommand`.
description: |
A secondary alias used to trigger the `Class.TextChatCommand`.
code_samples: []
type: string
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Behavior
serialization:
can_load: true
can_save: true
capabilities:
- Chat
writeCapabilities: []
methods: []
events:
- name: TextChatCommand.Triggered
summary: |
An event that developers can bind to execute commands.
description: |
An event that developers can bind to execute commands.
When a user sends a message to the server via
`Class.TextChannel:SendAsync()`, the message is intercepted by the
`Class.TextChatCommand` and not replicated to other users if the content
of the message matches "/{`Class.TextChatCommand.PrimaryAlias`}" or
"/{`Class.TextChatCommand.SecondaryAlias`}".
For example, for a `Class.TextChatCommand` with
`Class.TextChatCommand.PrimaryAlias` as "mute", if a user sends "/mute
SomeUserName", then the relevant `Class.TextChatCommand` for mute will
fire its `Class.TextChatCommand.Triggered`. The message "/mute
SomeUserName" is not replicated to other users.
code_samples: []
parameters:
- name: originTextSource
type: TextSource
default:
summary: |
A reference to the `Class.TextSource` responsible for triggering the
command via `Class.TextChannel:SendAsync()`.
- name: unfilteredText
type: string
default:
summary: |
The full, unfiltered text used to trigger the command that can be used
to dissect parameters from the command message.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities: []
writeCapabilities: []
callbacks: []