class SlackSmartBot
def pause_routine(dest, from, name)
save_stats(__method__)
if is_admin?
if !config.on_master_bot and dest[0] == "D"
respond "It's only possible to pause routines from MASTER channel from a direct message with the bot.", dest
elsif @routines.key?(@channel_id) and @routines[@channel_id].key?(name)
@routines[@channel_id][name][:status] = :paused
@routines[@channel_id][name][:next_run] = ""
update_routines()
respond "The routine *`#{name}`* has been paused.", dest
else
respond "There isn't a routine with that name: *`#{name}`*.\nCall `see routines` to see added routines", dest
end
else
respond "Only admin users can use this command", dest
end
end
end