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:
commit
0005646a5b
|
@ -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()
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
Loading…
Reference in a new issue