Fixes everything I broke 💯
This commit is contained in:
parent
6b98e23a0f
commit
4ff2163b49
@ -47,10 +47,7 @@ public class GuildSettings {
|
||||
|
||||
private void load() throws SQLException {
|
||||
if (!checkExists()) {
|
||||
Update update = new Update("INSERT INTO `settings` (`guild_id`, `log_enabled`, `log_channel`, `joinMessage`, `quitMessage`, `greetings`, `farewell`," +
|
||||
" `prefix`, `joinPm`, `joinVerification`, `defaultRole`, `muteRole`, `currency`)" +
|
||||
" VALUES ('" + guild.getId() + "', '0', 'default_value', 'default_value', 'default_value', 'default_value', 'default_value', '/'," +
|
||||
" 'default', '0', 'default_value', 'default_value', ' tokens');");
|
||||
Update update = new Update("INSERT INTO settings(guild_id, log_enabled, log_channel, joinMessage, quitMessage, greetings, farewell, prefix, joinPm, joinVerification, defaultRole, muteRole) VALUES ('" + guild.getId() + "', '0', 'default_value', 'default_value', 'default_value', 'default_value', 'default_value', '/', 'default', '0', 'default_value', 'default_value');");
|
||||
Rixa.getDatabase().send(update);
|
||||
return;
|
||||
}
|
||||
|
@ -57,7 +57,9 @@ public class UserData {
|
||||
if (!optional.isPresent()) return;
|
||||
if (!(optional.get() instanceof ResultSet)) return;
|
||||
ResultSet set = (ResultSet) optional.get();
|
||||
if (set.next()) {
|
||||
setExperience(set.getInt("experience"));
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ public class MusicModule implements RixaModule {
|
||||
Update update = new Update("INSERT INTO `music` (`guild_id`, `music_role`, `enabled`) VALUES ('" + guild.getId() + "', 'default_value', '0');");
|
||||
db.send(update);
|
||||
}
|
||||
Query query = new Query("SELECT * FROM `modules` WHERE `guild_id` = ?");
|
||||
Query query = new Query("SELECT * FROM `music` WHERE `guild_id` = ?");
|
||||
query.setString(guild.getId());
|
||||
Optional<?> optional = Rixa.getDatabase().send(query);
|
||||
if (!optional.isPresent()) return;
|
||||
|
Loading…
Reference in New Issue
Block a user