summaryrefslogtreecommitdiff
path: root/docs/channel/timer.md
blob: df72427ca7a8be18ab0dcd0a9c8974ded2a55632 (plain)
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
# Timers

> This command is for broadcaster only


The `!timer` command gives broadcasters the ability to create timers that sends messages to the chat room every specified interval.


## Syntax

### Create a new timer
`!timer new [name] [interval] [message...]`

+ `[name]` - The name for new timer. It should be unique for your chat.
+ `[interval]` - Message sending interval *(in seconds)*.
+ `[message]` - Text that will be sent after the interval has passed.

### Delete the timer
`!timer delete [name]`

+ `[name]` - The name of the timer.

### Edit the message for the timer
`!timer message [name] [message...]`

+ `[name]` - The name of the timer.
+ `[message]` - Text with which to replace.

### Edit the interval for the timer
`!timer interval [name] [interval]`

+ `[name]` - The name of the timer.
+ `[interval]` - An interval *(in seconds)* with which to replace.

### Toggle (enable/disable) the timer
`!timer toggle [name]`

+ `[name]` - The name of the timer.

### Check the information about the timer
`!timer info [name]`

+ `[name]` - The name of the timer.

### Call the timer
`!timer call [name]`

+ `[name]` - The name of the timer.

### Get the list of created timers
`!timer list`

## Usage

### Creating a new timer
+ `!timer new sub_ads 120 Buy a Twitch sub and be like all of us`

### Deleting the timer
+ `!timer delete sub_ads`

### Editing the message for the timer
+ `!timer message sub_ads Buy a Prime sub and be like all of us `

### Editing the interval for the timer
+ `!timer interval sub_ads 180`

### Toggling the timer
+ `!timer toggle sub_ads`

### Checking the information about the timer
+ `!timer info sub_ads`

### Calling the timer
+ `!timer call sub_ads`


## Responses

### Creating a new timer
+ `A new timer with "sub_ads" name has been successfully created!`

### Deleting the timer
+ `The "sub_ads" (ID ...) timer has been deleted!`

### Editing the message for the timer
+ `The message for "sub_ads" (ID ...) timer has been changed!`

### Editing the interval for the timer
+ `The interval for "sub_ads" (ID ...) timer has been changed!`

### Toggling the timer
+ If the timer was enabled

`The "sub_ads" (ID ...) timer has been disabled!` 

+ If the timer was disabled

`The "sub_ads" (ID ...) timer has been enabled!`

### Checking the information about the timer
+ `✅ sub_ads (ID ...) | Interval: 120s | Message: Buy a Twitch sub and be like all of us`

### Calling the timer
+ `Buy a Twitch sub and be like all of us` 

## Error handling

+ [Not enough arguments](/wiki/errors#0)
+ [Incorrect argument](/wiki/errors#2)
+ [Namesake creation](/wiki/errors#11)
+ [Not found](/wiki/errors#12)
+ [Something went wrong](/wiki/errors#127)