fix welcome msg
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 1m9s
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 1m9s
This commit is contained in:
parent
5b917af1ca
commit
b5b306cc6d
@ -13,6 +13,7 @@ import com.mongodb.client.model.Filters;
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import net.dv8tion.jda.api.entities.Member;
|
||||
import net.dv8tion.jda.api.entities.channel.concrete.TextChannel;
|
||||
import net.dv8tion.jda.api.entities.channel.unions.DefaultGuildChannelUnion;
|
||||
import net.dv8tion.jda.api.events.guild.GuildJoinEvent;
|
||||
@ -119,15 +120,22 @@ public class GuildService extends ListenerAdapter implements EventListener {
|
||||
TextChannel channel = defaultChannel.asTextChannel();
|
||||
BatCommand featureCommand = CommandService.INSTANCE.getCommand(FeatureCommand.class);
|
||||
BatCommand listSubCommand = featureCommand.getSubCommand(ListSubCommand.class);
|
||||
BatCommand helpCommand = CommandService.INSTANCE.getCommand(HelpCommand.class);
|
||||
Member owner = guild.getDiscordGuild().getOwner();
|
||||
if (owner != null) {
|
||||
channel.sendMessage(owner.getAsMention()).queue();
|
||||
}
|
||||
channel.sendMessageEmbeds(EmbedUtils.genericEmbed()
|
||||
.setDescription("""
|
||||
Hello! I'm %s, thank you for inviting me to your server!
|
||||
To get started, use the </%s> command to see all the commands I have to offer!
|
||||
To get started, use the </%s:%s> command to see all the commands I have to offer!
|
||||
|
||||
Most of my features are disabled by default, view my features with </%s %s:%s>
|
||||
Most of my features are disabled by default, view my features with </%s:%s %s:%s>
|
||||
""".formatted(
|
||||
DiscordService.JDA.getSelfUser().getAsMention(),
|
||||
CommandService.INSTANCE.getCommand(HelpCommand.class).getSnowflake(),
|
||||
helpCommand.getInfo().getName(),
|
||||
helpCommand.getSnowflake(),
|
||||
featureCommand.getInfo().getName(),
|
||||
featureCommand.getSnowflake(),
|
||||
listSubCommand.getInfo().getName(),
|
||||
listSubCommand.getSnowflake()
|
||||
|
Loading…
x
Reference in New Issue
Block a user