Advertisement
Guest User

Untitled

a guest
Jan 7th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 2.19 KB | None | 0 0
  1. class CommandHelp : ListenerAdapter() {
  2.  
  3.     @SubscribeEvent
  4.     fun CommandHelp(e: MessageReceivedEvent) {
  5.         var cmdHelpMsg = " help - lists all available commands"
  6.         var cmdKInfoMsg = "kamilkime - lists information about Kamil"
  7.         var cmdAvatarMsg = "avatar - shows your avatar"
  8.         var cmdAlkomatMsg = "breathalyser - shows how drunk you are (in promilles)"
  9.         var cmdJavaMsg = "java - links you to some Java tutorials"
  10.         var cmdCheckMsg = "check - shows stats of the Discord server"
  11.         var authorInfo = "Bot author - Superbizons"
  12.  
  13.        if (e.guild.name == "Kodziarze Kimka") {
  14.            if (e.message.content.startsWith("guard!help")) {
  15.                var message = MessageBuilder()
  16.                        .setEmbed(EmbedBuilder()
  17.                                .setTitle("Body Guard BOT - Help")
  18.                                .setDescription("Komendy Body Guard Bot'a")
  19.                                .setColor(Color(15103806))
  20.                                .addField("Music:"," In Future",false)
  21.                                .addField("Commands:","$cmdHelpMsg \n$cmdKInfoMsg \n$cmdAvatarMsg \n$cmdAlkomatMsg \n$cmdJavaMsg \n$cmdCheckMsg",false)
  22.                                .addField("Author:","$authorInfo",false)
  23.                                .build())
  24.                        .build()
  25.                e.textChannel.sendMessage(message).queue()
  26.            }
  27.        }else {
  28.            if (e.message.content.startsWith("guard!help")) {
  29.                var message = MessageBuilder()
  30.                        .setEmbed(EmbedBuilder()
  31.                                .setTitle("Body Guard BOT - Help")
  32.                                .setDescription("Komendy Body Guard Bot'a")
  33.                                .setColor(Color(15103806))
  34.                                .addField("Music:"," In Future",false)
  35.                                .addField("Commands:","$cmdHelpMsg \n$cmdAvatarMsg \n$cmdAlkomatMsg \n$cmdCheckMsg",false)
  36.                                .addField("Author:","$authorInfo",false)
  37.                                .build())
  38.                        .build()
  39.                e.textChannel.sendMessage(message).queue()
  40.            }
  41.        }
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement