Remove space from value for id on pref
This commit is contained in:
parent
61c0d31dbc
commit
91f35592f4
@ -140,6 +140,7 @@ public class Preference implements Commande {
|
|||||||
break;
|
break;
|
||||||
case "default_role_id":
|
case "default_role_id":
|
||||||
try{
|
try{
|
||||||
|
value = value.replaceAll(" ", "");
|
||||||
Role role = event.getGuild().getRoleById(value);
|
Role role = event.getGuild().getRoleById(value);
|
||||||
if(role != null){
|
if(role != null){
|
||||||
pref.setDefaultRoleId(role.getId());
|
pref.setDefaultRoleId(role.getId());
|
||||||
@ -177,6 +178,7 @@ public class Preference implements Commande {
|
|||||||
break;
|
break;
|
||||||
case "welcome_chanel_id":
|
case "welcome_chanel_id":
|
||||||
try{
|
try{
|
||||||
|
value = value.replaceAll(" ", "");
|
||||||
TextChannel chanel = event.getGuild().getTextChannelById(value);
|
TextChannel chanel = event.getGuild().getTextChannelById(value);
|
||||||
if(chanel != null){
|
if(chanel != null){
|
||||||
pref.setWelcomeChanelID(chanel.getId());
|
pref.setWelcomeChanelID(chanel.getId());
|
||||||
|
Loading…
Reference in New Issue
Block a user