2023-05-05 14:28:31 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-05-11 09:03:03 -04:00
|
|
|
DiscourseAi::AiBot::EntryPoint::BOTS.each do |id, bot_username|
|
|
|
|
UserEmail.seed do |ue|
|
|
|
|
ue.id = id
|
|
|
|
ue.email = "no_email_#{bot_username}"
|
|
|
|
ue.primary = true
|
|
|
|
ue.user_id = id
|
|
|
|
end
|
2023-05-05 14:28:31 -04:00
|
|
|
|
2023-05-11 09:03:03 -04:00
|
|
|
User.seed do |u|
|
|
|
|
u.id = id
|
|
|
|
u.name = bot_username.titleize
|
|
|
|
u.username = UserNameSuggester.suggest(bot_username)
|
|
|
|
u.password = SecureRandom.hex
|
|
|
|
u.active = true
|
|
|
|
u.admin = true
|
|
|
|
u.moderator = true
|
|
|
|
u.approved = true
|
|
|
|
u.trust_level = TrustLevel[4]
|
|
|
|
end
|
2023-05-05 14:28:31 -04:00
|
|
|
end
|