Merge branch 'bug/disalloweveryone' into 'master'

Make all output not have @everyone or @here in it

See merge request jdejeu/ottobotv2!5
This commit is contained in:
Julius de Jeu 2019-06-11 14:56:46 +00:00
commit 0005646a5b
3 changed files with 4 additions and 3 deletions

View file

@ -17,7 +17,8 @@ data class CommandMessage(
fun reply(message: String) =
MessageBuilder(message).buildAll(MessageBuilder.SplitPolicy.SPACE).forEach { reply(it) }
MessageBuilder(message).apply { this.replace("@here", "@hеre").replace("@everyone", "@еveryone") }
.buildAll(MessageBuilder.SplitPolicy.SPACE).forEach { reply(it) }
fun reply(messageEmbed: MessageEmbed) = event.channel.sendMessage(messageEmbed).queue()

View file

@ -5,7 +5,7 @@ import nl.voidcorp.discord.storage.GuildStore
import org.springframework.stereotype.Service
@Service
class SetVerifiedCommand : Command("verify", location = CommandSource.GUILD, commandLevel = CommandLevel.ADMIN) {
class SetVerifiedCommand : Command("verify", location = CommandSource.GUILD, commandLevel = CommandLevel.ADMIN, group = CommandGroup.ADMIN) {
override fun handle(event: CommandMessage): CommandResult {
val store = repo.findByGuildId(event.guild!!.idLong) ?: GuildStore(event.guild.idLong)
store.defaultVerified = !store.defaultVerified

View file

@ -8,4 +8,4 @@ spring.jpa.generate-ddl=true
spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
ottobot.version=1.4
ottobot.version=1.5