-
Notifications
You must be signed in to change notification settings - Fork 1
/
hopatop
23 lines (19 loc) · 876 Bytes
/
hopatop
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{{/*
This command posts one of YAG's un-patented "topics" in channels of your choice. This leads to a fun game of hopping around discord channels to reveal deep truths about yourself. Try it and see.
Recommended trigger: Interval
*/}}
{{/* CONFIGURATION VALUES START */}}
{{$channels := (cslice <CHANNEL IDS> )}} {{/* replace channel ids with any number of channels you want the command to run in.*/}}
{{$nocics := <NUMBER OF CHANNEL-IDS YOU PUT IN THE CSLICE>}} {{/* Ex, 10 */}}
{{/* CONFIGURATION VALUES End */}}
{{$no := "error"}}
{{$a := (toInt (dbGet 0 "topicCount").Value)}}
{{if gt $a $nocics}}
{{dbSet 0 "topicCount" 0}}
{{$no = 0}}
{{else}}
{{$no = $a}}
{{end}}
{{$channel := getChannel (index $channels $no) }}
{{$silent := dbIncr 0 "topicCount" 1}}
{{sendMessage $channel.ID (cembed "title" (joinStr "" (exec "topic") ) "color" 77 "timestamp" currentTime) }}