mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 06:59:53 -05:00
test
This commit is contained in:
parent
d59767fa0f
commit
c1ea074761
@ -21,10 +21,7 @@ def bot_command_rule(bot, trigger):
|
|||||||
if not len(trigger.args):
|
if not len(trigger.args):
|
||||||
return
|
return
|
||||||
|
|
||||||
message = str(trigger.args[1]).encode('utf-8', 'replace')
|
message = str(trigger.args[1]).decode('utf-8')
|
||||||
|
|
||||||
if is_ascii(message):
|
|
||||||
return
|
|
||||||
|
|
||||||
# ignore text coming from a valid prefix
|
# ignore text coming from a valid prefix
|
||||||
if str(message).startswith(tuple(bot.config.core.prefix_list)):
|
if str(message).startswith(tuple(bot.config.core.prefix_list)):
|
||||||
@ -89,12 +86,3 @@ def bot_command_rule(bot, trigger):
|
|||||||
else:
|
else:
|
||||||
bot.osd("I don't know what you are asking me to do!")
|
bot.osd("I don't know what you are asking me to do!")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
def is_ascii(s):
|
|
||||||
try:
|
|
||||||
s.decode('ascii')
|
|
||||||
except UnicodeDecodeError:
|
|
||||||
return False
|
|
||||||
else:
|
|
||||||
return True
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user