diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-11-12 14:39:15 +0100 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-11-12 14:39:15 +0100 |
commit | 19cd4e7ea97d08d61b5ba650a471bbd2e814d779 (patch) | |
tree | 78aeec5b2be9c5f7519554ad936405c68c40f637 /death.lua | |
parent | d4da90fada58be5eda399795ffbc82a1365d348b (diff) | |
download | furrybot-19cd4e7ea97d08d61b5ba650a471bbd2e814d779.tar.xz |
Structure overhaul
Diffstat (limited to 'death.lua')
-rw-r--r-- | death.lua | 26 |
1 files changed, 15 insertions, 11 deletions
@@ -52,19 +52,23 @@ furrybot.deathmessages = { "%s went off with a bang", } -function furrybot.commands.kill(name, target) - if furrybot.online_or_error(name, target, true) then - if name == target then - furrybot.send(string.format("%s died due to lack of friends", target), furrybot.colors.roleplay) - else - furrybot.send(string.format(furrybot.kill_deathmessages[math.random(#furrybot.kill_deathmessages)], target, name), furrybot.colors.roleplay) +furrybot.commands.kill = { + func = function(name, target) + if furrybot.online_or_error(name, target, true) then + if name == target then + furrybot.send(string.format("%s died due to lack of friends", target), furrybot.colors.roleplay) + else + furrybot.send(string.format(furrybot.kill_deathmessages[math.random(#furrybot.kill_deathmessages)], target, name), furrybot.colors.roleplay) + end end - end -end + end, +} -function furrybot.commands.die(name) - furrybot.send(string.format(furrybot.deathmessages[math.random(#furrybot.deathmessages)], name), furrybot.colors.roleplay) -end +furrybot.commands.die = { + func = function(name) + furrybot.send(string.format(furrybot.deathmessages[math.random(#furrybot.deathmessages)], name), furrybot.colors.roleplay) + end, +} return function(_http, _env, _storage) http, env, storage = _http, _env, _storage |