Skip to content

Commit

Permalink
Merge pull request #32 from Private-Parlor/v1.2
Browse files Browse the repository at this point in the history
V1.2, Re-pull
  • Loading branch information
Charibdys authored May 17, 2024
2 parents 4f6b8d7 + 4c20c8b commit ac56aa8
Show file tree
Hide file tree
Showing 188 changed files with 31,509 additions and 6,638 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Using the [Tourmaline](https://github.com/protoncr/tourmaline) Telegram bot libr
- Enable or disable commands and relaying of certain types of messages using the config file.
- Give users a level based on how much karma they have; user's can sign messages with their level using the `/ksign` command.
- Reduce noise and enforce original messages using the Robot 9000 auto moderator.
- *And more!*
- *[And more!](https://github.com/Private-Parlor/Private-Parlor-XT/wiki/Features)*
## Installation
Compiling PrivateParlor XT requires having both `crystal` and `shards` installed.

Expand Down
47 changes: 37 additions & 10 deletions config.yaml.copy
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ token:
## Accepted values: a file path
## Default: <none>
##
database:
database: private-parlor-xt.db

# --------------------------------
# Localization
Expand Down Expand Up @@ -113,7 +113,10 @@ locale: en-US
# --------------------------------

##
## Maintain statistics about the bot and allow them to be displayed to users.
## Maintain statistics about the bot
##
## If enabling this, then enable_stats should also be enabled to allow
## the statistics to be displayed to users
##
## Accepted values: true, false
## Default: false
Expand All @@ -131,13 +134,23 @@ locale: en-US
##
## Allow users to send photos, videos, or GIFs with a spoiler overlay
##
## If enabling this, any of the following should also be enabled:
## relay_photo
## relay_video
## relay_animation
## relay_media_group
##
## Accepted values: true, false
## Default: false
##
#media_spoilers: false

##
## Allow users to attach a reason to their upvote/downvote messages
##
## If enabling this, any of the following should also be enabled:
## enable_upvotes
## enable_downvotes
##
## Accepted values: true, false
## Default: false
Expand Down Expand Up @@ -204,6 +217,8 @@ locale: en-US
##
## Users will be required to set up a tripcode prior to chatting
##
## If enabling this, then enable_tripcode should also be enabled to allow users to set a tripcode
##
## Accepted values: true, false
## Default: false
##
Expand Down Expand Up @@ -272,7 +287,9 @@ locale: en-US
##
## Users can view their karma level and sign as their karma level if enabled
##
## Levels can be renamed, removed, or added; but values must be in ascending order
## Levels can be renamed, removed, or added
## The level with the lowest value will range from negative infinity to the start of the next largest level
## The level with the highest value will range from it to positive infinity
##
## Accepted values: An integer -> string mapping
## Default: <none>
Expand Down Expand Up @@ -332,6 +349,10 @@ locale: en-US
##
## This will also check regular forwards for originality.
##
## If enabling this, either of the following, or both, should also be enabled:
## toggle_r9k_text
## toggle_r9k_media
##
## Accepted values: true, false
## Default: false
##
Expand All @@ -353,7 +374,8 @@ locale: en-US
##
## Users who send an unoriginal message will be given a warning,
## and a cooldown based on the user's current amount of warnings
## unless r9k_cooldown is enabled.
##
## This option is mutually exclusive with r9k_cooldown
##
## Accepted values: true, false
## Default: false
Expand Down Expand Up @@ -397,6 +419,11 @@ locale: en-US
## Accepted values: a integer -> Rank mapping
## A rank requires a name, command permissions, and message permissions
##
## If adding either Ranksay permission to a rank, the name of the rank
## will be used to generate a '/[rank name]say' command.
## As such, any character in the name that is not English, an underscore, or a digit
## will be removed, and the remaining characters will form the command
##
## Accepted name values: any string
##
## Accepted command permission values: an any-length array, containing any of:
Expand Down Expand Up @@ -458,26 +485,26 @@ ranks:
name: "User"
command_permissions: [Upvote, Downvote, Sign, TSign]
message_permissions: [Text, Animation, Audio, Document, Video, VideoNote,
Voice, Photo, MediaGroup, Poll, Forward, Sticker, Venue, Location, Contact]
Voice, Photo, MediaGroup, Poll, Forward, Sticker]
10:
name: "Mod"
command_permissions: [Upvote, Downvote, Sign, TSign, RankedInfo, Users,
Warn, Delete, Ranksay]
message_permissions: [Text, Animation, Audio, Document, Video, VideoNote,
Voice, Photo, MediaGroup, Poll, Forward, Sticker, Venue, Location, Contact]
Voice, Photo, MediaGroup, Poll, Forward, Sticker]
100:
name: "Admin"
command_permissions: [Upvote, Downvote, Sign, TSign, RankedInfo, Users,
Warn, Delete, Uncooldown, Remove, Purge, Blacklist, Ranksay]
message_permissions: [Text, Animation, Audio, Document, Video, VideoNote,
Voice, Photo, MediaGroup, Poll, Forward, Sticker, Venue, Location, Contact]
Voice, Photo, MediaGroup, Poll, Forward, Sticker]
1000:
name: "Host"
command_permissions: [Upvote, Downvote, Sign, TSign, RankedInfo, Users,
PromoteLower, Demote, Warn, Delete, Uncooldown, Remove, Purge,
Blacklist, MotdSet, RanksayLower, Unblacklist]
message_permissions: [Text, Animation, Audio, Document, Video, VideoNote,
Voice, Photo, MediaGroup, Poll, Forward, Sticker, Venue, Location, Contact]
Voice, Photo, MediaGroup, Poll, Forward, Sticker]

##
## Default rank used when adding a new user,
Expand Down Expand Up @@ -531,7 +558,7 @@ enable_uncooldown: [true, false]
enable_remove: [true, false]
enable_purge: [true, false]
enable_blacklist: [true, false]
enable_blacklist: [true, false]
enable_unblacklist: [true, false]
enable_whitelist: [false, false]
enable_spoiler: [false, false]
enable_karma_info: [false, false]
Expand Down Expand Up @@ -674,7 +701,7 @@ relay_contact: false
#sign_limit_interval: 600

##
## Limit usage of upvotes once every interval (seconds)
## Limit usage of upvotes once every interval (seconds)
##
## Set to 0 to disable
##
Expand Down
144 changes: 143 additions & 1 deletion locales/de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ locale:
# Values for the loading bar, from empty, to partially full, to full
loading_bar: ["○", "◐", "●"]

# Symbols for increasing and decreasing change
change : ["📉", "📈"]

# The available statistics screens, used for /stats InlineKeyboard button names
statistics_screens:
general: "Info"
messages: "Nachrichten"
users: "Nutzer"
karma: "Karma"
karma_levels: "Karmaniveaus"
robot9000: "Robot9000"

# Parameters are enclosed by a placeholder, {text}, where text is any of the parameters next to the comment
# Placeholders should not be escaped
# Special characters in MarkdownV2 must be escaped
Expand Down Expand Up @@ -224,7 +236,7 @@ replies:
Du wurdest bis {duration} einen Cooldown gegeben\._
# Available placeholders: total
media_limit: "_Du kannst jetzt keine Medien oder weitergeleitete Nachrichten schicken\\. Du kannst in {total} Stunden wieder versuchen\\._"
media_limit: "_Du kannst jetzt keine Medien oder weitergeleitete Nachrichten schicken\\. Du kannst in {total} wieder versuchen\\._"

# Available placeholders: reason
blacklisted: |-
Expand All @@ -234,6 +246,8 @@ replies:
# Available placeholders: contact
blacklist_contact: "Kontakt: {contact}"

unblacklisted: "_Deine Verbot wurde aufgehoben\\!_"

# Available placeholders: msgs_deleted
purge_complete: "_{msgs_deleted} Nachrichten war gefunden und gelöscht\\._"

Expand All @@ -242,6 +256,127 @@ replies:
_Weil du untätig warst, du wurdest von hier entfernt \(AFK für {time} Tage\)\.
Benutzt den /start Befehl zu Nachrichten wieder bekommen anfangen\!_"
# Available placeholders: start_date, days, hours, minutes, seconds, registration_toggle,
# media_limit_period, message_lifespan, pseudonymous_toggle,
# spoilers_toggle, karma_reasons_toggle, robot9000_toggle,
# karma_economy_toggle
config_stats: |-
*In Betrieb seit {start_date}*
*Betriebszeit: {days} Tage, {hours} Stunden, {minutes} Minuten, {seconds} Sekunden*
Registrierung: {registration_toggle}
Nur Text Zeitraum {media_limit_period}
Lebensdauer der Nachricht: {message_lifespan}
Pseudonym Modus: {pseudonymous_toggle}
Medien Spoiler: {spoilers_toggle}
Karma Gründe: {karma_reasons_toggle}
Robot9000: {robot9000_toggle}
Karma Wirtschaft: {karma_economy_toggle}
# Available placeholders: total, album_total, animation_total, audio_total,
# contact_total, document_total, forward_total, location_total,
# photo_total, poll_total, sticker_total, text_total,
# venue_total, video_total, video_note_total, voice_total,
# daily_total, daily_change, change_today, weekly_total,
# weekly_change, change_this_week, monthly_total,
# monthly_change, change_this_month
message_stats: |-
*Nachrichten insgesamt: {total}*
Mediengruppen: {album_total}
GIFs: {animation_total}
Musik: {audio_total}
Kontakte: {contact_total}
Dateien: {document_total}
Weitergeleitete Nachrichten: {forward_total}
Standorte: {location_total}
Bilder: {photo_total}
Umfragen: {poll_total}
Aufkleber: {sticker_total}
Texte: {text_total}
Veranstaltungsorte: {venue_total}
Videos: {video_total}
Videonotizen: {video_note_total}
Sprache: {voice_total}
Heute geschickt: {daily_total} \({daily_change}% {change_today} seit gestern\)
Dieser Woche geschickt: {weekly_total} \({weekly_change}% {change_this_week} seit letzter Woche\)
Diesen Monat geschickt: {monthly_total} \({monthly_change}% {change_this_month} seit letztem Monat\)
# Available placeholders: total_users, joined_users, left_users, blacklisted_users,
# blacklisted_users, joined_daily_change, joined_change_today,
# joined_weekly_total, joined_weekly_change, joined_change_this_week,
# joined_monthly_total, joined_monthly_change, joined_change_this_month,
# left_daily_total, left_daily_change, left_change_today,
# left_weekly_total, left_weekly_change, left_change_this_week,
# left_monthly_total, left_monthly_change, left_change_this_month,
# net_daily, net_weekly, net_monthly
full_user_stats: |-
*Nutzer insgesamt: {total_users}*
Sind beigetreten: {joined_users}
Verlassen haben: {left_users}
Lokalverbot: {blacklisted_users}
Heute beigetreten: {joined_daily_total} \({joined_daily_change}% {joined_change_today} seit gestern\)
Diese Woche beigetreten: {joined_weekly_total} \({joined_weekly_change}% {joined_change_this_week} seit letzter Woche\)
Diesen Monat beigetreten: {joined_monthly_total} \({joined_monthly_change}% {joined_change_this_month} seit letztem Monat\)
Heute verlassen: {left_daily_total} \({left_daily_change}% {left_change_today} seit gestern\)
Diese Woche verlassen: {left_weekly_total} \({left_weekly_change}% {left_change_this_week} seit letzter Woche\)
Diesen Monat verlassen: {left_monthly_total} \({left_monthly_change}% {left_change_this_month} seit letztem Monat\)
Nettoveränderung heute: {net_daily} Nutzer
Nettoveränderung diese Woche: {net_weekly} Nutzer
Nettoveränderung in diesem Monat: {net_monthly} Nutzer
# Available placeholders: total_users, net_daily, net_weekly, net_monthly
user_stats: |-
*Nutzer insgesamt: {total_users}*
Nettoveränderung heute: {net_daily} Nutzer
Nettoveränderung diese Woche: {net_weekly} Nutzer
Nettoveränderung in diesem Monat: {net_monthly} Nutzer
# Available placeholders: upvotes, downvotes, upvote_daily_total, upvote_daily_change,
# upvote_change_today, upvote_weekly_total, upvote_weekly_change,
# upvote_change_this_week, upvote_monthly_total, upvote_monthly_change,
# upvote_change_this_month, downvote_daily_total, downvote_daily_change,
# downvote_change_today, downvote_weekly_total, downvote_weekly_change,
# downvote_change_this_week, downvote_monthly_total,
# downvote_monthly_change, downvote_change_this_month
karma_stats: |-
*Insgesamt gegebenes Karma: {upvotes}*
*Insgesamt entferntes Karma: {downvotes}*
Karma Heute gegeben: {upvote_daily_total} \({upvote_daily_change}% {upvote_change_today} seit gestern\)
Karma in dieser Woche gegeben: {upvote_weekly_total} \({upvote_weekly_change}% {upvote_change_this_week} seit letzter Woche\)
Karma in diesem Monat gegeben: {upvote_monthly_total} \({upvote_monthly_change}% {upvote_change_this_month} seit letztem Monat\)
Karma Heute entfernen: {downvote_daily_total} \({downvote_daily_change}% {downvote_change_today} seit gestern\)
Karma in dieser Woche entfernen: {downvote_weekly_total} \({downvote_weekly_change}% {downvote_change_this_week} seit letzter Woche\)
Karma in diesem Monat entfernen: {downvote_monthly_total} \({downvote_monthly_change}% {downvote_change_this_month} seit letztem Monat\)
# Available placeholders: karma_levels
karma_level_stats: |-
*Nutzer insgesamt für jede Karmaniveau*
{karma_levels}
# Available placeholders: total_unique, unique_text, unique_media, total_unoriginal, unoriginal_text, unoriginal_media
robot9000_stats: |-
*Einzigartige Nachrichten insgesamt: {total_unique}*
Einzigartige Texte: {unique_text}
Einzigartige Media: {unique_media}
*Wiederholte Nachrichten insgesamt: {total_unoriginal}*
Wiederholte Texte: {unoriginal_text}
Wiederholte Medien: {unoriginal_media}
no_stats_available: "Es gibt keine Statistiken\\."

success: ""

fail: ""
Expand Down Expand Up @@ -299,8 +434,12 @@ command_descriptions:

unpin: Die neueste Nachricht loslösen

stats: Statistiken über den Bot bekommen

blacklist: Ein Nutzer aus dem Chat sperren

unblacklist: Ein Nutzer aus dem Chat entsperren

whitelist: Ein Nutzer hier eintreten zu erlauben

motd: Die Regeln diesem Chat sehen
Expand Down Expand Up @@ -346,6 +485,9 @@ logs:
# Available placeholders: id, name, invoker, reason
blacklisted: "Nutzer {id}, alias {name}, hat durch {invoker} gesperrt {reason}"

# Available placeholders: id, name, invoker
unblacklisted: "Nutzer {id}, alias {name}, hat durch {invoker} entsperrt"

# Available placeholders: id, invoker
whitelisted: "{invoker} hat Nutzer {id} eingeladen"

Expand Down
Loading

0 comments on commit ac56aa8

Please sign in to comment.