Paste #53384: qwe

Date: 2019/03/21 18:53:29 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


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> "<&lt>@<context.author_ID><&gt> 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> "<&lt>@<context.author_ID><&gt> There is 1 player online; <def[Names].after[li@].replace[<&pipe>].with[, ]>"
            - else:
              - discord id:generalbot message channel:<context.channel> "<&lt>@<context.author_ID><&gt> Nobody."
            - queue clear