Ecosyste.ms: OpenCollective

An open API service for software projects hosted on Open Collective.

github.com/PitchBlackRecoveryProject/pbrp_tg_bot

Offiical Telegram Bot of PBRP
https://github.com/PitchBlackRecoveryProject/pbrp_tg_bot

Add a message broadcast function for announcements

6435ce1fd8db4dbea4f42afa499c23a247497f2e authored over 7 years ago by Paul Larsen <[email protected]>
Didnt think checking for admin was necessary

But apparently checking if users can promote isnt enough!

2be9c17f0694b1046d360fca23e81b05729bfb10 authored over 7 years ago by Paul Larsen <[email protected]>
Add an interface to react on chat migrate.

On chat migration, this will be triggered - allowing you to handle any
databases which might nee...

e28824b90f91fb255b3747ba06d0044d9058ce2f authored over 7 years ago by Paul Larsen <[email protected]>
add some more /runs strings, and add a /slap command inspired by @octonezd's plugin. (changed some strings I found unnecessary.)

7d7f993cb7cb13cf6bad4b85a5932b1f34568981 authored over 7 years ago by Paul Larsen <[email protected]>
Add license - long overdue

cc13c48b79b3d34c5e812eececa8bd4b216fe44d authored over 7 years ago by Paul Larsen <[email protected]>
Manually revert the previous 'optimisation' which turned out to be a regression. regex is the best for longer strings, as opposed to splitting on whitespace, strippnig punctuation and converting to lower.

1bfa4ff93fc4dd8058bf03630b06aaf69dc83164 authored over 7 years ago by Paul Larsen <[email protected]>
Add a reply message when unbanning a user

32f1368d9fd74ee3e7ca8c31fda0bc3656964d19 authored over 7 years ago by Paul Larsen <[email protected]>
fix a help string

2c9ee5a1a354e4023d3fd3239cc7d687a6044100 authored over 7 years ago by Paul Larsen <[email protected]>
fix sticker replies not being set properly on bot restart + optimised the searcher to avoid using re.search - its needlessly expensive.

8a6eb008305f98230b5189773064c079d2b2131c authored over 7 years ago by Paul Larsen <[email protected]>
add ability to reply to filters with a sticker

315fdf71e894be613109e4c5398ede82580649a3 authored over 7 years ago by Paul Larsen <[email protected]>
use a filter on /del and /purge to ensure theyre both replies

680f2a04daf2dd85735d48f417d915c069c21cd5 authored over 7 years ago by Paul Larsen <[email protected]>
Avoid bruhhbot users from saving replied messages as 'from' by marking it as a keyword - also, reduce if statement galore for note saving.

25ca5f89461816439e6d6eecc32181a666cf3938 authored over 7 years ago by Paul Larsen <[email protected]>
fix an incorrect string

b5a547e236d30bb6f1746ad86efd4a571bc24177 authored over 7 years ago by Paul Larsen <[email protected]>
use with <lock>; statements to ensure an error doesnt hold a lock forever and potentially consume all worker threads as they block for the lock.

ed9acbf693ac503e3a539aef00d2f8f2b678c60b authored over 7 years ago by Paul Larsen <[email protected]>
fix a possible duplicate primary key insertion issue.

1aae435210ba94694d26d295e162ea340e7b12b7 authored over 7 years ago by Paul Larsen <[email protected]>
add usermentions to muting/kicking/promoting

7303e3de28edf81b05d00158162a452c404a0b35 authored over 7 years ago by Paul Larsen <[email protected]>
add unmute to reply

484d1d7e093c59f89f935f594a78847a87b43e7a authored over 7 years ago by Paul Larsen <[email protected]>
Refactor.

- Use locks to enfore no threading issues.
- Change the /welcome args to on and off
- Add a /adm...

182b4bc9ec7cb97048072ff049aa6ce53ec64b9e authored over 7 years ago by Paul Larsen <[email protected]>
Remove the finance module

noone uses it, it's not loaded, and completely unfinished - no point.

ca7ee5adf4948fec44c2cf55cdca8e160c214b09 authored over 7 years ago by Paul Larsen <[email protected]>
fix a typo which had spread like a disease and had been copy pasted around the place

cc54977db492e762196b787504cc0a925ba34d59 authored over 7 years ago by Paul Larsen <[email protected]>
modules:admin: Only send sticker when actually kicking

* Save some facepalms.

Signed-off-by: Harsh Shandilya <[email protected]>

c76fc7bbe2bca4f8ffe716eff2d7febf260b63d6 authored over 7 years ago by Harsh Shandilya <[email protected]>
Bug fixes, error handling.

No new features, but fixed:
- A potential session error on welcome messages
- Use the long versi...

2c0a2dad9b565c191b4eaa634d43379f3438ab31 authored over 7 years ago by Paul Larsen <[email protected]>
Merge branch 'master' of github.com:PaulSonOfLars/tgbot

decfad27c49a971c9bee934e6e1db2763f69eecc authored over 7 years ago by Paul Larsen <[email protected]>
add a new /saved command (same as /notes), and use first name for the welcome message

276362d4308b49f3b277d54c55f6fb31e2643ce9 authored over 7 years ago by Paul Larsen <[email protected]>
Fixed a possible None iterator issue, and slightly tweak regex to match symbols before the string

c51e61327760c36f1f6415955092b0827a04ba26 authored over 7 years ago by Paul Larsen <[email protected]>
rename misleading /invite function to /invitelink, and set silent pinning as default pin type

4af23bb5d07e7fb8fe2eef0640ee7c0ec8a3338e authored over 7 years ago by Paul Larsen <[email protected]>
Move some functions from __main__.py to modules/misc.py. Also added a /time <place> command, which gets you the time at this location.

f8d6d277fae267be1bfc2d945ee7085c5504e280 authored over 7 years ago by Paul Larsen <[email protected]>
remove a duplicate code bug stopping chat creators from hsing the bot

83aff84145fab617a4f9c09da404e49a31c8bca8 authored over 7 years ago by Paul Larsen <[email protected]>
awas using the wrong string to test for group ownership, fixed

fe512c3499489c4aee36e74242b5ba376e44fd8f authored over 7 years ago by Paul Larsen <[email protected]>
fix potential nonetype

e20f7414afdc419035bd4d3f188cfedd7b985256 authored over 7 years ago by Paul Larsen <[email protected]>
add support for a user database to be able to call users by their username. Also add telegram restrictions to use the build in blocking.

2072c2495f371cdcf5bd0389acbcbd09073a0f04 authored over 7 years ago by Paul Larsen <[email protected]>
Add a new decorator + fix is_user_admin not working for owners

00c297c088e69c713b0e2c628ad9aae9c7cd76ae authored over 7 years ago by Paul Larsen <[email protected]>
Remove unecessary variables. If you dont want a message dump, set it to None, or an empty string.

c376b357685703c97b02f8b85dc2a6115039de52 authored over 7 years ago by Paul Larsen <[email protected]>
Add an option to save note messages to another conversation, hence

avoiding message deletion causing lost messages. Also update readme to
have my telegram ID.

716a5636862b9f0c1164010b24a7a4196caf6dc5 authored over 7 years ago by Paul Larsen <[email protected]>
fix possible None value in welcome messages

2ea87b774a817bb07a84a73b9b03d43b1fe51a83 authored over 7 years ago by Paul Larsen <[email protected]>
Parse incoming notes to avoid invalid markdown being saved, which the bot would be unable to send

ce5821c1a332c68586d832a68c01a06484add36c authored over 7 years ago by Paul Larsen <[email protected]>
Remove useless simaohandler - joke, was unused anyway

e7a7b3667e2b77c40cd4ce1e2a5ebb45ff010290 authored over 7 years ago by Paul Larsen <[email protected]>
update readme

fd7db5931cf4b325d5a694bbc6e55c3709795c90 authored over 7 years ago by Paul Larsen <[email protected]>
add regex escaping and fix an equality bug

5e7eaa0f539c2b4256c02faa06ed6db19744efaa authored over 7 years ago by Paul Larsen <[email protected]>
Fix a minor None bug due to previous refactor

764cc2c1648e885b11fd351136f916c816e82c15 authored over 7 years ago by Paul Larsen <[email protected]>
add owner_id as an automatic bot admin

2db8911efec4fb596110b7d36e3e56654119f819 authored over 7 years ago by Paul Larsen <[email protected]>
add decorators to make the code simpler to read. Also, refactor to use these decorators.

0d92e6eb20de753394c38667bd6b319475cd5a7a authored over 7 years ago by Paul Larsen <[email protected]>
add support for punctuation after the matched word

511df4b90c5ef596264550691b68f936e2f5070f authored over 7 years ago by Paul Larsen <[email protected]>
fix not removing previous handler with similar names

4a9b369fdf4e97202b01c7dfe2b5dab18e31a9e4 authored over 7 years ago by Paul Larsen <[email protected]>
Add persistence to filters. Filters are now retained across bot restarts, using the usual sql database.

a1c7218053aca0664a469d2b4f2be58bc55615b6 authored over 7 years ago by Paul Larsen <[email protected]>
add some chat safety to cust_filters, such as to only be able to see the filters in the current chat. Also, set requirements.txt to require version 8.0.0 of python-telegram-bot

f33130828c2885ea77f4159035315eab9b23bb4e authored over 7 years ago by Paul Larsen <[email protected]>
added custom filters via the /filter <keyword> <reply_text> command. WIP, does not persist over bot reloads.

b371867c0522fc06149a48b3e0b34bdb43b42609 authored over 7 years ago by Paul Larsen <[email protected]>
minor cleanups to use filters for restricting commands. Also give the

/ban command a nice sticker

34f599c66355f8f0dc1e99a6e68c4cf7aa177495 authored over 7 years ago by Paul Larsen <[email protected]>
fixed some None value errors, and a string fix

84f1323165f903ffd97809acdfc1d08f5ffdf1fb authored over 7 years ago by Paul Larsen <[email protected]>
Use UnicodeText datatype instead of Unicode

9366def5ad63e7a6bd924617a45fe77742848558 authored over 7 years ago by Paul Larsen <[email protected]>
check if table exists before trying to create it

c01e19231e51f05d12a7a849972095868505ead4 authored over 7 years ago by Paul Larsen <[email protected]>
Cleanup the previous table creation. Tables are now created one by one, and only if that module is in use.

92993fd0a246946ac87b68064e91544976b9e2e9 authored over 7 years ago by Paul Larsen <[email protected]>
Merge branch 'master' of github.com:PaulSonOfLars/tgbot

064ddab923001c7ed3246cdce8506d4fc802443a authored over 7 years ago by Paul NV Larsen <[email protected]>
ensure encoiding on the engine is set to utf8

cc8a97922963b718a2737ef3c3d377830ce60f9f authored over 7 years ago by Paul NV Larsen <[email protected]>
fix character escaping issue in userinfo

04c1240f3caa420c65f027623eefd5c1adce357e authored over 7 years ago by Paul Larsen <[email protected]>
fix sql tables not builing properly since the sql cleanup

61a2b46b70d4edd6039f4aaf9b970466cb8e8c3b authored over 7 years ago by Paul Larsen <[email protected]>
Use Unicode instead of Text to save strings

bae0fe4a92761a94e7637b1d31004941c6879b3b authored over 7 years ago by Paul Larsen <[email protected]>
remove unecessary prints

8ac5f9a9db904b80bb06f586b8ec582cd86fbe79 authored over 7 years ago by Paul Larsen <[email protected]>
Overall cleanups. Split models into the appropriate files under modules/sql/, cleaned up my custom filters, and other minor logic changes

1031cbf095c9fc345ba9b287818dd84d25b680f1 authored over 7 years ago by Paul Larsen <[email protected]>
added a preference handler for the /welcome message

9a4fb2d9313165c8bb5914b246189cc8415335d3 authored over 7 years ago by Paul Larsen <[email protected]>
remove deprecated database model for muted users. This isnt used anymore, in favour of using the telegram API.

4d29c895b71293719c890bc3a87e917f1171652c authored over 7 years ago by Paul Larsen <[email protected]>
added a message when a user joins/leaves a group

d6e2ca490528c1062fe67da4a43fc6fba5097fc5 authored over 7 years ago by Paul Larsen <[email protected]>
Changed module loading logic to read a json file. Also, added a no_load option to stop a few modules from being loaded, instead of specfiying which ones SHOULD be.

5e6e310536ee6ebdacb8e9862b1630b79e5a2d00 authored over 7 years ago by Paul Larsen <[email protected]>
fix notes not escaping markdown properly - user note names now don't show as markdown.

1774e048dcd86d9379127946a023ea3d425dfcc6 authored over 7 years ago by Paul Larsen <[email protected]>
ensure longer help messages aren't over the max message size by splitting them into multiple messages

5065c07f09f39c5720acabcd7598110de83ef9f6 authored over 7 years ago by Paul Larsen <[email protected]>
Reformat help strings. Bot now PM's users the result of the /help command to avoid group spam

3a26c2b9d086179d7b448d4ce1b59c072b170607 authored over 7 years ago by Paul Larsen <[email protected]>
update README

ecaca3ce893d48abf37ab6478915bfac48f3d52d authored over 7 years ago by Paul Larsen <[email protected]>
add a /help function, which is dynamically loaded from the docs variable in each imported module.

0af444c12f5996b3d0275f26c6e2a996062321ce authored over 7 years ago by Paul Larsen <[email protected]>
fix an sqlalchemy error

853281183bfc1c23002f36fe0dbab1c136b07e44 authored over 7 years ago by Paul Larsen <[email protected]>
add message forwarding for notes

96b59e898dfae1cf6b062766e155822e3f7a4891 authored over 7 years ago by Paul Larsen <[email protected]>
use new database schema to support forwarding messages

7a9665bca57d7a9402869cf06f5a6a541470f4cf authored over 7 years ago by Paul NV Larsen <[email protected]>
fixed some minor errors with userinfo and bio. also removed 'no note' message when using hash gets for notes

5cc6fb4758a54a32d0e30c3e9ede20d093c801ac authored over 7 years ago by Paul NV Larsen <[email protected]>
add listing the notes in the current chat

3507764cf5a6e706d9834a457139c599c07fcfd3 authored over 7 years ago by Paul NV Larsen <[email protected]>
forgot to add protocol to /ip command - its now added

95860acfc495b0c2f97e32f15b3a8b57ff2b2856 authored over 7 years ago by Paul NV Larsen <[email protected]>
add ip function

3e6bebc7c83074418246286139fab124f62a14d8 authored over 7 years ago by Paul Larsen <[email protected]>
use a regex handler instead of a hashfilter - hashfilter had bugs anyway.

176950be62a46bdfdb76d68784ca906914146255 authored over 7 years ago by Paul Larsen <[email protected]>
Start of grammar check module, as well as a /bio function for fun and setting other people's bios.

3c73602bd860fc97b3a9055d6f8e09cef26407c2 authored over 7 years ago by Paul Larsen <[email protected]>
cleanup some commonly used functions into a helper file, as well as reinforce admin permissions to work properly now

544a679090b622006259fbb65b49dac2c67d8505 authored over 7 years ago by Paul Larsen <[email protected]>
use the TG API muting instead of some hacky autodelete muting. Had to use pwrtelegram.xyz api for this, to get user id's from their username.

46eaed616beeefb0725047588a14f18ea105ead8 authored over 7 years ago by Paul Larsen <[email protected]>
Start implementation of muting, and split a few files up for readability. Disabled the finance module temporarily.

25c56433a00295ff17e2c4e166c2c85464e26c83 authored over 7 years ago by Paul Larsen <[email protected]>
some permission optimisations (now with a new db model)

0688eb86e1ad15518e97928f69f42a2f5cf5029d authored over 7 years ago by Paul Larsen <[email protected]>
added purge and kickme commands

01b54744bd1c415395cb21d16410d11a79cd07f2 authored over 7 years ago by Paul Larsen <[email protected]>
dynamic loader logic fix

aa3f3255e8a8e869fe5762de34a5ea79ca61e34b authored over 7 years ago by Paul Larsen <[email protected]>
Lots of new features.

1) Work on the finance module begins, heavily inspired by my previous
bot. Very much beta, and m...

8a786b935ae130190a332dc1d2f59d2419454204 authored over 7 years ago by Paul Larsen <[email protected]>
use a web worker for websockets on heroku

f55d74fd8423c7c022b90d1230740051ef8ca957 authored over 7 years ago by Paul Larsen <[email protected]>
change imports for heroku

14131d44e42d6ac5a40f631a1470a28e10d719ab authored over 7 years ago by Paul Larsen <[email protected]>
More heroku configs

65c744079a6478bed5e0a3481a2f9cb5add28ee7 authored over 7 years ago by Paul Larsen <[email protected]>
update db uri

83a95671cb419f962d44b70334255e289b1f3437 authored over 7 years ago by Paul Larsen <[email protected]>
cleanup to be more PEP8, and start heroku env var config setups

d46ff3d3050b5fe4102e9e2fba5818db388f09c6 authored over 7 years ago by Paul Larsen <[email protected]>
fix minor bug

cac31332645b1a7f654b06a9248ba9ed76ccce9a authored over 7 years ago by Paul Larsen <[email protected]>
Revert add pypy3.5 compatibility, and add some admin functions:

/pin, /unpin, /ban, /unban, and /id

cf4369eb79336e4ad6eb772e667bfcf6f9bc0578 authored over 7 years ago by Paul Larsen <[email protected]>
add pypy3.5 compatibility

413332b224f25951de5c9823d7349196ea90c9c7 authored over 7 years ago by Paul Larsen <[email protected]>
async a bunch of function calls - should work, but will test over the next few days. Also fix a /delete case if you dont relpy to a message (or reply to a bot)

cc4d86952187f49d662363829b7be58b84f00eb7 authored over 7 years ago by Paul Larsen <[email protected]>
forgot a file

93abdfc5d4020a7c10c8e32d4d6e87695b5df008 authored over 7 years ago by Paul Larsen <[email protected]>
added a function to delete messages, cleaned up, and still working on understanding the telegram error being raised at user promotion/deletion.

83e62643dea05a6190ed7520ace06e4060881df1 authored over 7 years ago by Paul Larsen <[email protected]>
update saving function to work with newlines, and added a /me and /setme command for setting user info globally

961ff4c0725fb8f5181512f045c3ebfed769303e authored over 7 years ago by Paul Larsen <[email protected]>
refactor - now have a 'modules' packages, which is dynamically loaded at bot start. add handlers to the dispatcher there, and watch your modules get added

da8fdd72417873bd04341b8e943ef08c22c460c1 authored over 7 years ago by Paul Larsen <[email protected]>
added the # for get requests, and saving from messages

dbabe0a7fd2e8566143960200b6aa2bef7ce10c8 authored over 7 years ago by Paul Larsen <[email protected]>
added permissions, and tried to add promotions

7dad0ff6d495ef5d2b896847879fbce44cadb4e3 authored over 7 years ago by Paul Larsen <[email protected]>
Fixed none bug in delete, and a bad equality in get

9db744efb4ebd3d1c082e623bb4dfb8b1f765c1b authored over 7 years ago by Paul Larsen <[email protected]>