class SlackSmartBot
def see_repls(dest, user, typem)
save_stats(__method__)
if has_access?(__method__, user)
message = ""
@repls.sort.to_h.each do |session_name, repl|
if ((repl.creator_name == user.name and repl.creator_team_id == user.team_id) or repl.type == :public or repl.type == :public_clean) or (is_admin?(user) and typem == :on_dm)
message += "(#{repl.type}) *#{session_name}*: #{repl.description} / created: #{repl.created} / accessed: #{repl.accessed} / creator: #{repl.creator_name} / runs: #{repl.runs_by_creator+repl.runs_by_others} / gets: #{repl.gets} \n"
end
end
message = "No repls created" if message == ''
respond message
end
end
end