Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add info command #22

Merged
merged 13 commits into from
Jul 21, 2020
50 changes: 50 additions & 0 deletions src/main/kotlin/io/github/yuutoproject/yuutobot/commands/Info.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* Open source bot built by and for the Camp Buddy Discord Fan Server.
* Copyright (C) 2020 Kyuuto-devs
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package io.github.yuutoproject.yuutobot.commands

import io.github.yuutoproject.yuutobot.commands.base.AbstractCommand
import io.github.yuutoproject.yuutobot.commands.base.CommandCategory
import io.github.yuutoproject.yuutobot.utils.Constants
import net.dv8tion.jda.api.EmbedBuilder
import net.dv8tion.jda.api.events.message.guild.GuildMessageReceivedEvent

class Info : AbstractCommand("info", CommandCategory.INFO, "Shows the information about the bot and it's developers", "info") {
override val aliases = arrayOf("bot", "credits")
zsotroav marked this conversation as resolved.
Show resolved Hide resolved

override fun run(args: MutableList<String>, event: GuildMessageReceivedEvent) {
val InfoEmbed = EmbedBuilder()
zsotroav marked this conversation as resolved.
Show resolved Hide resolved
.setColor(0xFF93CE)
.setAuthor(
"Yuuto from Camp Buddy",
"https://blitsgames.com",
"https://cdn.discordapp.com/emojis/593518771554091011.png"
)
.setDescription(
"Yuuto was made and developed by the community, for the community. \n" +
"Join the dev team and start developing on the [project website](https://kyuuto.io/docs). \n\n" +
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://kyuuto.io/docs is currently broken. We (probably me) need to sort this out before release.

"Version ${Constants.YUUTO_VERSION} (Kyuuto v${Constants.KYUUTO_VERSION}) was made and developed by: \n" +
duncte123 marked this conversation as resolved.
Show resolved Hide resolved
"**Arch#0226**, **dunste123#0129**, **zsotroav#8941** \n \n" +
"Quick Change log: \n" +
"```diff\nMoved all code from JavaScript to Kotlin \n```"
)
.setFooter("Yuuto: Release ${Constants.YUUTO_VERSION} | ${Constants.YUUTO_RELEASE}")

event.channel.sendMessage(InfoEmbed.build()).queue()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,7 @@ package io.github.yuutoproject.yuutobot.utils
// This class should only contain static booleans, ints, strings etc (no classes)
// as they are hardcoded into the code at compile time
object Constants {
const val YUUTO_VERSION = "3.0"
const val YUUTO_RELEASE = "2020-TBA" // Release date of the current version
const val YUUTO_VERSION = "3.0" // Version of the bot (the user sees)
const val KYUUTO_VERSION = "1.0" // Version of Kyuuto, the Kotlin version
}