small-worlds / discordbot

MIT License
1 stars 1 forks source link

create resources/lastdeath.json if it doesn't exist #5

Open tacocatcodes opened 8 years ago

tacocatcodes commented 8 years ago

I noticed on bot startup that I forgot to copy the resources over from the old install. See below for stacktrace.

[ERROR : ct-5 @ 2016-10-05 20:48:34.296] Exception: #<Errno::ENOENT: No such file or directory @ rb_sysopen - resources/lastdeath.json>
[ERROR : ct-5 @ 2016-10-05 20:48:34.297] /home/lane/discordbot/app/custom_commands.rb:43:in `read'
[ERROR : ct-5 @ 2016-10-05 20:48:34.297] /home/lane/discordbot/app/custom_commands.rb:43:in `block in <module:CustomCommands>'
[ERROR : ct-5 @ 2016-10-05 20:48:34.297] /home/lane/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/discordrb-2.1.3/lib/discordrb/commands/parser.rb:85:in `call'
[ERROR : ct-5 @ 2016-10-05 20:48:34.297] /home/lane/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/discordrb-2.1.3/lib/discordrb/commands/command_bot.rb:167:in `execute_command'
[ERROR : ct-5 @ 2016-10-05 20:48:34.297] /home/lane/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/discordrb-2.1.3/lib/discordrb/commands/command_bot.rb:182:in `simple_execute'
[ERROR : ct-5 @ 2016-10-05 20:48:34.297] /home/lane/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/discordrb-2.1.3/lib/discordrb/commands/command_bot.rb:270:in `block in execute_chain'
tacocatcodes commented 7 years ago

This should now also create resources/alldeaths.json too.