From d5bd7995f8af80c24fa079418b723aef51d1bb34 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 4 Jan 2024 13:35:09 +0000 Subject: [PATCH] Adds nikkemobile subreddit --- .../channels/r_nikkemobile/__init__.py | 1 + reddit2telegram/channels/r_nikkemobile/app.py | 35 +++++++++++++++++++ .../channels/r_nikkemobile/tags.txt | 1 + reddit2telegram/own.cron | 1 + 4 files changed, 38 insertions(+) create mode 100644 reddit2telegram/channels/r_nikkemobile/__init__.py create mode 100644 reddit2telegram/channels/r_nikkemobile/app.py create mode 100644 reddit2telegram/channels/r_nikkemobile/tags.txt diff --git a/reddit2telegram/channels/r_nikkemobile/__init__.py b/reddit2telegram/channels/r_nikkemobile/__init__.py new file mode 100644 index 00000000..dc9a4dc9 --- /dev/null +++ b/reddit2telegram/channels/r_nikkemobile/__init__.py @@ -0,0 +1 @@ +# Just empty file diff --git a/reddit2telegram/channels/r_nikkemobile/app.py b/reddit2telegram/channels/r_nikkemobile/app.py new file mode 100644 index 00000000..c713a59a --- /dev/null +++ b/reddit2telegram/channels/r_nikkemobile/app.py @@ -0,0 +1,35 @@ +#encoding:utf-8 + +from utils import weighted_random_subreddit + + +# Subreddit that will be a source of content +subreddit = weighted_random_subreddit({ + 'NikkeMobile': 1.0, + # If we want get content from several subreddits + # please provide here 'subreddit': probability + # 'any_other_subreddit': 0.02 +}) +# Telegram channel with @reddit2telegram_bot as an admin +t_channel = '@r_nikkemobile' + + +def send_post(submission, r2t): + return r2t.send_simple(submission, + # Submission should have at least min_upvotes_limit upvotes. + min_upvotes_limit=50, + # If you do not want text submissions, just pass False. + text=True, + # If you want gifs, just pass True or text you want under gif. + gif=True, + # If you want videos, just pass True or text you want under gif. + video=True, + # If you want images, just pass True or text you want under image. + img=True, + # If you want Imgur albums, just pass True or text you want under albums. + album=True, + # If you want Reddit galleries, just pass True or text you want under albums. + gallery=True, + # If you do not want other submissions, just pass False. + other=True + ) diff --git a/reddit2telegram/channels/r_nikkemobile/tags.txt b/reddit2telegram/channels/r_nikkemobile/tags.txt new file mode 100644 index 00000000..b7d707a3 --- /dev/null +++ b/reddit2telegram/channels/r_nikkemobile/tags.txt @@ -0,0 +1 @@ +#nikke #mobile #shiftup #rpg #mobilegame \ No newline at end of file diff --git a/reddit2telegram/own.cron b/reddit2telegram/own.cron index a78180e8..9985fd14 100644 --- a/reddit2telegram/own.cron +++ b/reddit2telegram/own.cron @@ -813,3 +813,4 @@ MASK submodule_name 59 * * * * r_pokemonmasters 59 */2 * * * r_badcode 59 * * * * reddit_argentina +59 * * * * r_nikkemobile \ No newline at end of file