mirror of
https://github.com/nexus-stc/hyperboria
synced 2024-12-23 10:07:46 +01:00
- [promotions] Export
GitOrigin-RevId: 9450124ab0308c005508e24418e3c1753ea2fdba
This commit is contained in:
parent
7c1bb06b1b
commit
52d3985ec5
@ -33,8 +33,9 @@ class TelegramApplication(AioRootThing):
|
||||
self.promotioner = Promotioner(
|
||||
promotions=get_promotions(),
|
||||
promotion_vars=dict(
|
||||
related_channel=self.config['telegram']['related_channel'],
|
||||
mutual_aid_group=self.config['telegram']['mutual_aid_group'],
|
||||
twitter_contact_url=self.config['twitter']['contact_url'],
|
||||
related_channel=self.config['telegram']['related_channel'],
|
||||
)
|
||||
)
|
||||
self.user_manager = UserManager()
|
||||
|
@ -100,7 +100,8 @@ telegram:
|
||||
- nexus.bot.handlers.search.SearchEditHandler
|
||||
- nexus.bot.handlers.search.SearchPagingHandler
|
||||
- nexus.bot.handlers.search.InlineSearchHandler
|
||||
mutual_aid_group: nexus_aaron
|
||||
# Channel that will be shown in /help, /howtohelp and in promotions
|
||||
related_channel: 'nexus_search'
|
||||
related_channel: nexus_search
|
||||
twitter:
|
||||
contact_url: https://twitter.com/the_superpirate
|
||||
|
15
nexus/promotions/BUILD.bazel
Normal file
15
nexus/promotions/BUILD.bazel
Normal file
@ -0,0 +1,15 @@
|
||||
load("@rules_python//python:defs.bzl", "py_library")
|
||||
|
||||
py_library(
|
||||
name = "promotions",
|
||||
srcs = glob(
|
||||
["**/*.py"],
|
||||
exclude = ["tests/**"],
|
||||
),
|
||||
data = ["promotions.yaml"],
|
||||
srcs_version = "PY3",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//library/configurator",
|
||||
],
|
||||
)
|
8
nexus/promotions/__init__.py
Normal file
8
nexus/promotions/__init__.py
Normal file
@ -0,0 +1,8 @@
|
||||
from library.configurator import Configurator
|
||||
|
||||
|
||||
def get_promotions():
|
||||
return Configurator(['nexus/promotions/promotions.yaml'])['promotions']
|
||||
|
||||
|
||||
promotions = get_promotions()
|
36
nexus/promotions/promotions.yaml
Normal file
36
nexus/promotions/promotions.yaml
Normal file
@ -0,0 +1,36 @@
|
||||
---
|
||||
|
||||
promotions:
|
||||
- texts:
|
||||
en: 💬 The victory of humanity is inevitable
|
||||
weight: 1
|
||||
- texts:
|
||||
en: 💬 Shall build Standard Template Construct
|
||||
weight: 1
|
||||
- texts:
|
||||
en: 💬 Gaining knowledge is the only purpose of life
|
||||
weight: 1
|
||||
- texts:
|
||||
en: 💬 Knowledge cannot belong
|
||||
weight: 1
|
||||
- texts:
|
||||
en: 💬 Obey the path of discovery
|
||||
weight: 1
|
||||
- texts:
|
||||
en: 💬 Research is the only and ultimate goal
|
||||
weight: 1
|
||||
- texts:
|
||||
en: ✋ Have a subscription to paid articles? [Help researchers!](https://t.me/{mutual_aid_group})
|
||||
ru: ✋ Есть доступ к платным статьям? [Помоги ученым!](https://t.me/{mutual_aid_group})
|
||||
weight: 25
|
||||
- texts:
|
||||
en: ✋ Help us, become a seeder of books. Learn how in /seed
|
||||
ru: ✋ Сохрани наследие, раздавай книги нуждающимся. Узнай как в /seed
|
||||
weight: 25
|
||||
- texts:
|
||||
en: ⤴️ Stay tuned with us at @{related_channel} and [Twitter]({twitter_contact_url})
|
||||
es: ⤴️ Mantente en contacto con nosotros en @{related_channel} y [Twitter]({twitter_contact_url})
|
||||
it: ⤴️ Resta aggiornato con noi su @{related_channel} e [Twitter]({twitter_contact_url})
|
||||
pb: ⤴️ Fique ligado conosco em @{related_channel} e [Twitter]({twitter_contact_url})
|
||||
ru: ⤴️ Оставайся на связи с нами на @{related_channel} и в [Twitter]({twitter_contact_url})
|
||||
weight: 25
|
Loading…
Reference in New Issue
Block a user