SHOW:
|
|
- or go back to the newest paste.
1 | options: | |
2 | token: ODIyOTIzNDk0NTkyMzQ4MTcw.YFZVOg.6bcUVHeSShb2oDGoI2IIV1DXym0 | |
3 | bot: ColdBot | |
4 | prefix: . | |
5 | staffRole: Staff | |
6 | status: do not disturb | |
7 | statusAktivitet: watching | |
8 | statusBesked: Seneste køb på Cold | |
9 | Kanal: 822925136646111322 | |
10 | ticketKategori: Test | |
11 | VerifyRole: 822439693915783200 | |
12 | mcChatDiscord: true | |
13 | - | mcChatDiscordID: 822925136646111322 |
13 | + | mcChatDiscordID: 823293416925691945 |
14 | buyChatId: 823287960946343936 | |
15 | ||
16 | variables: | |
17 | {emeralder::*} = 0 | |
18 | ||
19 | ||
20 | on load: | |
21 | login to "{@token}" with the name "{@bot}" | |
22 | set status of "{@bot}" to {@status} | |
23 | mark "{@bot}" as {@statusAktivitet} "{@statusBesked}" | |
24 | if {Tickets} isn't set: | |
25 | set {Tickets} to 0 | |
26 | ||
27 | on unload: | |
28 | set status of "{@bot}" to do not disturb | |
29 | ||
30 | ||
31 | on chat: | |
32 | if "{@mcChatDiscord}" = "true": | |
33 | if "%message%" contains "@": | |
34 | stop | |
35 | else: | |
36 | set {_tid} to 2nd element of split "%now%" at " " | |
37 | send "(%{_tid}%) **%player%** » %message%" to channel with id "{@mcChatDiscordID}" with "{@bot}" | |
38 | ||
39 | guild message receive seen by "{@bot}": | |
40 | if discord id of event-channel is "{@Kanal}": | |
41 | wait 5 seconds | |
42 | delete event-message | |
43 | ||
44 | function buyTing(p: player, k: text, a: integer): | |
45 | create embed: | |
46 | set the title of embed to title with text "BUYCRAFT" | |
47 | set the color of the embed to Aqua | |
48 | set {_mb} to a new message builder | |
49 | append line "**Spiller Info**" to {_mb} | |
50 | append line "Navn: %{_p}%" to {_mb} | |
51 | append line "Købt: %{_k}%" to {_mb} | |
52 | append line "Pris: %{_a}% Emeralder" to {_mb} | |
53 | append line "" to {_mb} | |
54 | append line "**Server Info**" to {_mb} | |
55 | append line "Navn: Cold" to {_mb} | |
56 | append line "Online: %size of all players%" to {_mb} | |
57 | append line "Tjent: %{emeralder::*}%" to {_mb} | |
58 | append line "" to {_mb} | |
59 | append line "**/SERVER COLD**" to {_mb} | |
60 | set the description of embed to "%{_mb}%" | |
61 | set the timestamp of the embed to now | |
62 | send last created embed to channel with id "{@buyChatId}" with "{@bot}" | |
63 | ||
64 | command /købting [<offline player>] [<text>] [<integer>]: | |
65 | permission: admin | |
66 | trigger: | |
67 | if arg-3 is set: | |
68 | buyTing(arg-1, "%arg-2%", arg-3) | |
69 | else: | |
70 | send "&c/købting spiller ting pris" |