RiiConnect24 / RC24-Bot

Server bot for the RiiConnect24 Discord server that can store Wii friend codes to be added. | https://discord.gg/rc24
https://rc24.xyz/
MIT License
36 stars 7 forks source link

Mod log #8

Closed spotlightishere closed 7 years ago

spotlightishere commented 7 years ago

Currently, on servers without a mod log, we get the following:

[ERROR : et-14417 @ 2017-03-26 23:02:57.454] Exception: #<NoMethodError: undefined method `resolve_id' for nil:NilClass>
[ERROR : et-14417 @ 2017-03-26 23:02:57.454] /home/spotlight/gems/ruby/2.4.0/gems/discordrb-3.2.1/lib/discordrb/cache.rb:33:in `channel'
[ERROR : et-14417 @ 2017-03-26 23:02:57.454] /home/spotlight/RC24-Bot/modules/userjoin.rb:13:in `get_mod_log?'
[ERROR : et-14417 @ 2017-03-26 23:02:57.454] /home/spotlight/RC24-Bot/modules/userjoin.rb:89:in `block in <module:Userjoin>'
[ERROR : et-14417 @ 2017-03-26 23:02:57.454] /home/spotlight/gems/ruby/2.4.0/gems/discordrb-3.2.1/lib/discordrb/events/generic.rb:98:in `call'
[ERROR : et-14417 @ 2017-03-26 23:02:57.454] /home/spotlight/gems/ruby/2.4.0/gems/discordrb-3.2.1/lib/discordrb/bot.rb:1227:in `block in call_event'

A check should be added. I don't have enough time to do it myself.

spotlightishere commented 7 years ago

It be noted that this is due to the server at one point having a log, but the channel was deleted. Locally I ave a change implemented, I'll have to push it later along with some other logging state stuff I have set up.

joscomputing commented 7 years ago

Fixed, somewhere that I don't even remember lol but it went in with all of the log reformatting