Class | ::User |
In: |
lib/rbot/core/userdata.rb
|
Parent: | Object |
This method removes the data associated with the key, returning the value of the deleted key.
# File lib/rbot/core/userdata.rb, line 44 44: def delete_botdata(*keys) 45: Irc::Utils.bot.plugins['userdata'].delete_data(self, *keys) 46: end
This method is used to store Bot data associated with the receiver. If no block is passed, value is stored for the key key; if a block is passed, it will be called with the previous key value as parameter, and its return value will be stored as the new value. If value is present in the block form, it will be used to initialize key if it‘s missing.
If you have to do large-scale editing of the Bot data Hash, please use with_botdata.
# File lib/rbot/core/userdata.rb, line 29 29: def set_botdata(key, value=nil, &block) 30: Irc::Utils.bot.plugins['userdata'].set_data(self, key, value, &block) 31: end