Date: 2019/03/21 18:53:29 UTC-07:00
Type: Denizen Script
Discord_Bots:
type: world
debug: true
events:
on discord message received for:generalbot:
- if <context.mentions.contains[<context.self>]> && <context.message.contains[@everyone].not>:
- define OnlineList "li@Who's online|Whose online|whos online|who online|who is online|who'se online|who be online|whos on the server|whose on the server|who is on the server|who on server|whomst is on thy server|how many people are on|whose on|whos on|who finna minecraft|whose mining|who mining|whos mining|who's mining|who's there|whose there|whos there|rolecall|who there"
- narrate <def[onlinelist]>
- narrate <context.message>
- if <context.message.contains_any[<def[OnlineList]>]>:
- define Names li@
- foreach <server.list_online_players>:
- define Name <def[value].name.display.strip_color>
- define Names <def[Names].include[<def[Name]>]>
- define count <server.list_online_players.size>
- if <def[count]> > 1:
- discord id:generalbot message channel:<context.channel> "<<>@<context.author_ID><>> There are <def[count]> players online; <def[Names].after[li@].replace[<&pipe>].with[, ]>"
- else if <def[count]> == 1:
- discord id:generalbot message channel:<context.channel> "<<>@<context.author_ID><>> There is 1 player online; <def[Names].after[li@].replace[<&pipe>].with[, ]>"
- else:
- discord id:generalbot message channel:<context.channel> "<<>@<context.author_ID><>> Nobody."
- queue clear