containsInvite

fun Message.containsInvite(): Boolean

Checks if this message contains a Discord invite.


fun String.containsInvite(): Boolean

Whether this string contains a discord invite.

Samples


fun main() { 
   //sampleStart 
   /** A discord invite url */
    public val invite: Regex = Regex("(https?://)?(www\\.)?(discord\\.(gg|me|io|com/invite)/)([^\\s]+)") 
   //sampleEnd
}