Search in sources :

Example 11 with MessageChannel

use of net.dv8tion.jda.core.entities.MessageChannel in project Ardent by adamint.

the class MusicConfig method noArgs.

@Override
public void noArgs(Guild guild, MessageChannel channel, User user, Message message, String[] args) throws Exception {
    Cursor<HashMap> settings = r.db("data").table("music_settings").filter(row -> row.g("guild_id").eq(guild.getId())).run(connection);
    if (settings.hasNext()) {
        MusicSettingsModel musicSettingsModel = asPojo(settings.next(), MusicSettingsModel.class);
        sendTranslatedMessage("**music Settings**\n" + "Delete music play messages: " + musicSettingsModel.isRemove_addition_messages(), channel, user);
    } else
        sendTranslatedMessage("Your guild has no set music settings! Type **/manage** to find your portal" + " link", channel, user);
}
Also used : Guild(net.dv8tion.jda.core.entities.Guild) Cursor(com.rethinkdb.net.Cursor) User(net.dv8tion.jda.core.entities.User) Command(tk.ardentbot.core.executor.Command) MusicSettingsModel(tk.ardentbot.rethink.models.MusicSettingsModel) Database.connection(tk.ardentbot.rethink.Database.connection) Database.r(tk.ardentbot.rethink.Database.r) HashMap(java.util.HashMap) MessageChannel(net.dv8tion.jda.core.entities.MessageChannel) Message(net.dv8tion.jda.core.entities.Message) HashMap(java.util.HashMap) MusicSettingsModel(tk.ardentbot.rethink.models.MusicSettingsModel)

Aggregations

Guild (net.dv8tion.jda.core.entities.Guild)11 Message (net.dv8tion.jda.core.entities.Message)11 MessageChannel (net.dv8tion.jda.core.entities.MessageChannel)11 User (net.dv8tion.jda.core.entities.User)11 Subcommand (tk.ardentbot.core.executor.Subcommand)8 Command (tk.ardentbot.core.executor.Command)7 EmbedBuilder (net.dv8tion.jda.core.EmbedBuilder)6 Database.connection (tk.ardentbot.rethink.Database.connection)4 Database.r (tk.ardentbot.rethink.Database.r)4 MessageUtils (tk.ardentbot.utils.discord.MessageUtils)4 ArrayList (java.util.ArrayList)3 HashMap (java.util.HashMap)3 Cursor (com.rethinkdb.net.Cursor)2 SecureRandom (java.security.SecureRandom)2 Map (java.util.Map)2 Shard (tk.ardentbot.main.Shard)2 ShardManager (tk.ardentbot.main.ShardManager)2 MapUtils (tk.ardentbot.utils.MapUtils)2 GuildUtils (tk.ardentbot.utils.discord.GuildUtils)2 UserUtils (tk.ardentbot.utils.discord.UserUtils)2