Apexal / regit

A Ruby Discord bot for creating/managing school servers.
MIT License
11 stars 1 forks source link

Add moodle link to course channel topic #4

Closed Apexal closed 7 years ago

Apexal commented 7 years ago
server.text_channels.select { |t| t.association == :course }.each do |t|
    old = t.topic.split(' | ')[0]
    course = Regit::Database::Course.find_by_text_channel_id(t.id)
    t.topic = “#{old} | http://moodle.regis.org/course/view.php?id=#{course.id}”
end
Apexal commented 7 years ago

Thanks !irb!