-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Added a version command at request by Asoji.
- Loading branch information
1 parent
aabd6c3
commit 7c183f4
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package one.devos.yiski.commands.slash | ||
|
||
import net.dv8tion.jda.api.JDA | ||
import one.devos.yiski.Yiski | ||
import xyz.artrinix.aviation.Aviation | ||
import xyz.artrinix.aviation.command.slash.SlashContext | ||
import xyz.artrinix.aviation.command.slash.annotations.SlashCommand | ||
import xyz.artrinix.aviation.entities.Scaffold | ||
|
||
class Version : Scaffold { | ||
@SlashCommand("version", "Shows the bots version") | ||
suspend fun version(ctx: SlashContext) { | ||
val user = ctx.jda.getUserById(299779734932291604) | ||
ctx.sendPrivateEmbed { | ||
setThumbnail(ctx.jda.selfUser.effectiveAvatarUrl) | ||
addField("Yiski 6", Yiski.version, true) | ||
addField("JDA", JDA::class.java.`package`.implementationVersion, true) | ||
addField("Aviation", Aviation::class.java.`package`.implementationVersion, true) | ||
setFooter("Built with love, sweat & tears by ${user?.asTag ?: "Storm"}", user?.effectiveAvatarUrl) | ||
} | ||
} | ||
} |
7c183f4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This worked in dev but for some fucking reason assigns Yiskis package version to all dependencies when built.
Will fix later.