Skip to content

Commit

Permalink
display bot version on about commnad
Browse files Browse the repository at this point in the history
  • Loading branch information
MagicTeaMC committed Aug 27, 2023
1 parent c216b92 commit 0a9c6ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.jagrosh.jdautilities.commons.JDAUtilitiesInfo;
import com.jagrosh.jdautilities.doc.standard.CommandInfo;
import com.jagrosh.jdautilities.examples.doc.Author;
import com.jagrosh.jmusicbot.utils.OtherUtil;
import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.JDAInfo;
Expand Down Expand Up @@ -65,7 +66,7 @@ protected void execute(CommandEvent event) {
builder.setColor(event.isFromType(ChannelType.TEXT) ? event.getGuild().getSelfMember().getColor() : this.color);
builder.setAuthor(event.getSelfUser().getName() + " 的資訊!", null, event.getSelfUser().getAvatarUrl());
String author = event.getJDA().getUserById(event.getClient().getOwnerId()) == null ? "<@" + event.getClient().getOwnerId() + ">" : event.getJDA().getUserById(event.getClient().getOwnerId()).getName();
StringBuilder descr = (new StringBuilder()).append("你好! 我是 **").append(event.getSelfUser().getName()).append("**。 ").append(this.IS_AUTHOR ? "使用Java寫成" : "我的擁有者是").append(" **").append(author).append("** ,本機器人依賴於 [JDA Utilities](https://github.com/JDA-Applications/JDA-Utilities) (").append(JDAUtilitiesInfo.VERSION).append(") 以及 [JDA wrapper](https://github.com/discord-jda/JDA) (").append(JDAInfo.VERSION).append(")\n\n請輸入 `").append(event.getClient().getTextualPrefix()).append(event.getClient().getHelpWord())
StringBuilder descr = (new StringBuilder()).append("你好! 我是 **").append(event.getSelfUser().getName()).append("** (v" + OtherUtil.getCurrentVersion() + ")。 ").append(this.IS_AUTHOR ? "使用Java寫成" : "我的擁有者是").append(" **").append(author).append("** ,本機器人依賴於 [JDA Utilities](https://github.com/JDA-Applications/JDA-Utilities) (").append(JDAUtilitiesInfo.VERSION).append(") 以及 [JDA wrapper](https://github.com/discord-jda/JDA) (").append(JDAInfo.VERSION).append(")\n\n請輸入 `").append(event.getClient().getTextualPrefix()).append(event.getClient().getHelpWord())
.append("` 來查看我的指令!").append("\n請 [`邀請`](" + this.oauthLink + ")"+ "我到你的伺服器!");
descr.append("\n").append(event.getClient().getSuccess().startsWith("<") ? REPLACEMENT_ICON : event.getClient().getSuccess()).append(" ");

Expand Down

0 comments on commit 0a9c6ff

Please sign in to comment.