forked from lekoOwO/auto-ytarchive-raw
-
Notifications
You must be signed in to change notification settings - Fork 7
/
text.py.example
53 lines (44 loc) · 3.56 KB
/
text.py.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import utils
def get_private_check_text(status, video_id=None):
# import getjson
# with getjson.build_req(video_id) as res:
# html = res.read().decode()
# info = getjson.get_youtube_video_info(video_id, html)
# # Do some if-else using info object
# Change the Text in return "" to customize the Messages in Discord/Push.
# For pinging Discord roles right click the group mention, Copy ID and then add them like this: <@&ROLEIDHERE>
if status is utils.PlayabilityStatus.PRIVATED:
return "[{video_id}](https://youtu.be/{video_id}) is privated on [{channel_name}](https://www.youtube.com/channel/{channel_id})."
elif status is utils.PlayabilityStatus.REMOVED:
return "[{video_id}](https://youtu.be/{video_id}) is removed on [{channel_name}](https://www.youtube.com/channel/{channel_id})."
elif status is utils.PlayabilityStatus.COPYRIGHTED:
return "[{video_id}](https://youtu.be/{video_id}) is copyrighted on [{channel_name}](https://www.youtube.com/channel/{channel_id})."
elif status is utils.PlayabilityStatus.UNKNOWN:
return "[{video_id}](https://youtu.be/{video_id}) something weird occurred on [{channel_name}](https://www.youtube.com/channel/{channel_id})."
elif status is utils.PlayabilityStatus.MEMBERS_ONLY:
return "[{video_id}](https://youtu.be/{video_id}) is members only on [{channel_name}](https://www.youtube.com/channel/{channel_id})."
elif status is utils.PlayabilityStatus.LOGIN_REQUIRED:
return "[{video_id}](https://youtu.be/{video_id}) requires login on [{channel_name}](https://www.youtube.com/channel/{channel_id})."
elif status is utils.PlayabilityStatus.OFFLINE: # Should not be here though. But I do dumb things.
return "[{video_id}](https://youtu.be/{video_id}) offline on [{channel_name}](https://www.youtube.com/channel/{channel_id})."
elif status is utils.PlayabilityStatus.UNLISTED:
return "[{video_id}](https://youtu.be/{video_id}) is unlisted on [{channel_name}](https://www.youtube.com/channel/{channel_id})."
else:
return "[{video_id}](https://youtu.be/{video_id}) something very weird occurred on [{channel_name}](https://www.youtube.com/channel/{channel_id})."
def get_onlive_message(live_status, video_id=None):
if live_status is utils.PlayabilityStatus.ON_LIVE:
return "[{video_id}](https://youtu.be/{video_id}) is live at [{channel_name}](https://www.youtube.com/channel/{channel_id})!"
elif live_status is utils.PlayabilityStatus.MEMBERS_ONLY:
return "[{video_id}](https://youtu.be/{video_id}) has a members only live at [{channel_name}](https://www.youtube.com/channel/{channel_id})!"
elif live_status is utils.PlayabilityStatus.PREMIUM:
return "[{video_id}](https://youtu.be/{video_id}) is a Youtube premium only stream live on [{channel_name}](https://www.youtube.com/channel/{channel_id})!"
elif live_status is utils.PlayabilityStatus.LOGIN_REQUIRED:
return "[{video_id}](https://youtu.be/{video_id}) is live at [{channel_name}](https://www.youtube.com/channel/{channel_id})!"
else:
return "[{video_id}](https://youtu.be/{video_id}) is live at [{channel_name}](https://www.youtube.com/channel/{channel_id})!"
# If you leave this empty it will not posts the multiple manifest messages
MULTI_MANIFEST_MESSAGE = "[{video_id}](https://youtu.be/{video_id}) has multiple manifest on [{channel_name}](https://www.youtube.com/channel/{channel_id})!"
PUSHALERT_TITLE = "🔴 Hololive Live Alert"
PUSHALERT_MESSAGE = "{channelName} is Live now!"
FCM_TITLE = "🔴 {channelName}"
FCM_MESSAGE = "{title}"