animekaizoku / saitamarobot Goto Github PK
View Code? Open in Web Editor NEWAn anime-themed telegram group management bot.
License: GNU General Public License v3.0
An anime-themed telegram group management bot.
License: GNU General Public License v3.0
Describe the bug
As bot api cant pull the list of bots in group, no need to show just saitama itself either.
Perhaps this can be edited to show something like where Saitama shows his own title too.
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/psutil
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=580 -DPSUTIL_LINUX=1 -I/usr/include/python3.6m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.6/psutil/_psutil_common.o
psutil/_psutil_common.c:9:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-8msg74w8/psutil/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-mak6ttru-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-8msg74w8/psutil/
isseu run pip3 install -r requirements.txt
Is your feature request related to a problem? Please describe.
Welcome mute shows a welcome mute/welcome message to a gbanned user and follows it with a gban alert.
Describe the solution you'd like
Do not show welcome mute or custom welcome for gbanned/spamwatched ones.
Just their ban notice
Following bugs need exception handling
Traceback (most recent call last):
File "/app/SaitamaRobot/modules/dev.py", line 38, in leave
update.effective_message.reply_text("Beep boop, I left that soup!.")
File "/app/.heroku/python/lib/python3.8/site-packages/telegram/message.py", line 515, in reply_text
return self.bot.send_message(self.chat_id, *args, **kwargs)
File "<decorator-gen-2>", line 2, in send_message
File "/app/.heroku/python/lib/python3.8/site-packages/telegram/bot.py", line 67, in decorator
result = func(*args, **kwargs)
File "/app/.heroku/python/lib/python3.8/site-packages/telegram/bot.py", line 346, in send_message
return self._message(url, data, disable_notification=disable_notification,
File "/app/.heroku/python/lib/python3.8/site-packages/telegram/bot.py", line 175, in _message
result = self._request.post(url, data, timeout=timeout)
File "/app/.heroku/python/lib/python3.8/site-packages/telegram/utils/request.py", line 330, in post
result = self._request_wrapper('POST', url,
File "/app/.heroku/python/lib/python3.8/site-packages/telegram/utils/request.py", line 242, in _request_wrapper
raise Unauthorized(message)
telegram.error.Unauthorized: Forbidden: bot is not a member of the supergroup chat
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.8/site-packages/telegram/utils/promise.py", line 56, in run
self._result = self.pooled_function(*self.args, **self.kwargs)
File "/app/SaitamaRobot/modules/helper_funcs/chat_status.py", line 107, in is_dev_plus_func
return func(update, context, *args, **kwargs)
File "/app/SaitamaRobot/modules/dev.py", line 40, in leave
update.effective_message.reply_text(
File "/app/.heroku/python/lib/python3.8/site-packages/telegram/message.py", line 515, in reply_text
return self.bot.send_message(self.chat_id, *args, **kwargs)
File "<decorator-gen-2>", line 2, in send_message
File "/app/.heroku/python/lib/python3.8/site-packages/telegram/bot.py", line 67, in decorator
result = func(*args, **kwargs)
File "/app/.heroku/python/lib/python3.8/site-packages/telegram/bot.py", line 346, in send_message
return self._message(url, data, disable_notification=disable_notification,
File "/app/.heroku/python/lib/python3.8/site-packages/telegram/bot.py", line 175, in _message
result = self._request.post(url, data, timeout=timeout)
File "/app/.heroku/python/lib/python3.8/site-packages/telegram/utils/request.py", line 330, in post
result = self._request_wrapper('POST', url,
File "/app/.heroku/python/lib/python3.8/site-packages/telegram/utils/request.py", line 242, in _request_wrapper
raise Unauthorized(message)
telegram.error.Unauthorized: Forbidden: bot is not a member of the supergroup chat
here are two typos found in markdownhelp:
SaitamaRobot/SaitamaRobot/modules/misc.py
Line 21 in adc948e
*:*
isn't working there. And it looks weird if the colon is bold.SaitamaRobot/SaitamaRobot/modules/misc.py
Line 26 in adc948e
2021-02-11 10:10:29,382 - telegram.utils.promise - ERROR - An uncaught error was raised while running the promise
Traceback (most recent call last):
File "E:\SaitamaRobot\env\lib\site-packages\telegram\utils\promise.py", line 56, in run
self._result = self.pooled_function(*self.args, **self.kwargs)
File "E:\SaitamaRobot\SaitamaRobot\modules\userinfo.py", line 232, in info
and not message.parse_entities([MessageEntity.TEXT_MENTION])
NameError: name 'MessageEntity' is not defined
1044879856
A module has been imported but is not used anywhere in the file. The module should either be used or the import should be removed.
There are 6 occurrences of this issue in the repository.
See all occurrences on DeepSource โ deepsource.io/gh/AnimeKaizoku/SaitamaRobot/issue/PYL-W0611/occurrences/
I have 101 chats in my federation when I type /fedchats i get this error
2021-06-26 21:39:16,697 - telegram.utils.promise - ERROR - An uncaught error was raised while running the promise Traceback (most recent call last): File "/home/tgbot/.local/lib/python3.7/site-packages/telegram/utils/promise.py", line 56, in run self._result = self.pooled_function(*self.args, **self.kwargs) File "/home/tgbot/tg/SaitamaRobot/modules/helper_funcs/alternate.py", line 22, in command_func return func(update, context, *args, **kwargs) File "/home/tgbot/tg/SaitamaRobot/modules/feds.py", line 2072, in fed_chats chat_name = dispatcher.bot.getChat(chats).title File "/home/tgbot/.local/lib/python3.7/site-packages/decorator.py", line 232, in fun return caller(func, *(extras + args), **kw) File "/home/tgbot/.local/lib/python3.7/site-packages/telegram/bot.py", line 67, in decorator result = func(*args, **kwargs) File "/home/tgbot/.local/lib/python3.7/site-packages/telegram/bot.py", line 2327, in get_chat result = self._request.post(url, data, timeout=timeout) File "/home/tgbot/.local/lib/python3.7/site-packages/telegram/utils/request.py", line 333, in post **urlopen_kwargs) File "/home/tgbot/.local/lib/python3.7/site-packages/telegram/utils/request.py", line 237, in _request_wrapper message = self._parse(resp.data) File "/home/tgbot/.local/lib/python3.7/site-packages/telegram/utils/request.py", line 195, in _parse raise RetryAfter(retry_after) telegram.error.RetryAfter: Flood control exceeded. Retry in 17 seconds
Could someone help every time I load welcome module I start getting these errors
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedColumn) column welcome_pref.custom_content does not exist LINE 1: ...ef.should_goodbye AS welcome_pref_should_goodbye, welcome_pr...
^
Which then starts a chain reaction
Just to test the owo looking emoji labels.
Awww Bura Laga KR$NA bhaiya GitHub Ko PornHub Bana Dala ?
Traceback (most recent call last):
File "/usr/local/lib/python3.8/runpy.py", line 185, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/local/lib/python3.8/runpy.py", line 144, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/local/lib/python3.8/runpy.py", line 111, in _get_module_details
import(pkg_name)
File "/root/saitama_co7/SaitamaRobot/init.py", line 183, in
from SaitamaRobot.modules.helper_funcs.handlers import (
File "/root/saitama_co7/SaitamaRobot/modules/helper_funcs/handlers.py", line 1, in
import SaitamaRobot.modules.sql.blacklistusers_sql as sql
File "/root/saitama_co7/SaitamaRobot/modules/sql/init.py", line 15, in
SESSION = start()
File "/root/saitama_co7/SaitamaRobot/modules/sql/init.py", line 8, in start
engine = create_engine(DB_URI, client_encoding="utf8")
File "", line 2, in create_engine
File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/deprecations.py", line 298, in warned
return fn(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/create.py", line 522, in create_engine
entrypoint = u._get_entrypoint()
File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/url.py", line 653, in _get_entrypoint
cls = registry.load(name)
File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 341, in load
raise exc.NoSuchModuleError(
sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:postgres
self host
centos7
plese help anyone
I got the following error after running bot but don't remember it before is it new or is it just because running python 12
/home/tgbot/btg/tg_bot/modules/helper_funcs/handlers.py:126: TelegramDeprecationWarning: RegexHandler is deprecated. See https://git.io/fxJuV for more info
super().init(pattern, callback, **kwargs)
/home/tgbot/.local/lib/python3.7/site-packages/telegram/ext/regexhandler.py:121: TelegramDeprecationWarning: message_updates is deprecated. See https://git.io/fxJuV for more info
edited_updates=edited_updates)
/home/tgbot/.local/lib/python3.7/site-packages/telegram/ext/regexhandler.py:121: TelegramDeprecationWarning: channel_post_updates is deprecated. See https://git.io/fxJuV for more info
edited_updates=edited_updates)
/home/tgbot/.local/lib/python3.7/site-packages/telegram/ext/regexhandler.py:121: TelegramDeprecationWarning: edited_updates is deprecated. See https://git.io/fxJuV for more info
edited_updates=edited_updates)
I feel like I ask too much! But I was wondering can someone please help with feds.py and getting the fimport command working..
I know its probably lost a bit of attention.. but I see it working on AllMightRobot . . But I love SaitamaRobot..
For starters I should of said is it going to work ?
Lawdi hai tu lawdi teri maa ki chut teri teri bhen ko nanga karke chudunga
I wanted to ask that...
Just type your question here [...]
Im very sorry.
File "/home/tgbot/tgbot/SaitamaRobot/modules/remote_cmds.py", line 9, in
from SaitamaRobot.modules.helper_funcs.filters import CustomFilters
File "/home/tgbot/tgbot/SaitamaRobot/modules/helper_funcs/filters.py", line 6, in
class CustomFilters(object):
File "/home/tgbot/tgbot/SaitamaRobot/modules/helper_funcs/filters.py", line 11, in CustomFilters
support_filter = _Supporters()
TypeError: Can't instantiate abstract class _Supporters with abstract methods call
2021-02-11 10:03:12,323 - telegram.utils.promise - ERROR - An uncaught error was raised while running the promise
Traceback (most recent call last):
File "E:\SaitamaRobot\env\lib\site-packages\telegram\utils\promise.py", line 56, in run
self._result = self.pooled_function(*self.args, **self.kwargs)
File "E:\SaitamaRobot\SaitamaRobot\modules\helper_funcs\chat_status.py", line 385, in connected_status
update.effective_user.id,
AttributeError: 'NoneType' object has no attribute 'id'
awdawdawdawda
I'm out bitch
Describe the bug
A fedbanned user isnt banned right away when they text in a group they are fbanned in.
See screenshot, where the replied to user, is in the group, texting normally while being fed banned.
To Reproduce
Expected behavior
Bot should ban the user as soon as they text in the group.
๐๐๐๐๐ฉ๐ฉ๐ฉ๐ฉ๐ฉ๐ฉ๐ฉ๐ฉ๐๐๐๐๐๐
Its you guys planing to update support to python_telegram_bot==12.5.1 ?
Getting warnings and AttributeError errors on 12.5.1
super().__init__(pattern, callback, **kwargs) /data/bots/.local/lib/python3.7/site-packages/telegram/ext/regexhandler.py:121: TelegramDeprecationWarning: message_updates is deprecated. See https://git.io/fxJuV for more info edited_updates=edited_updates) /data/bots/.local/lib/python3.7/site-packages/telegram/ext/regexhandler.py:121: TelegramDeprecationWarning: channel_post_updates is deprecated. See https://git.io/fxJuV for more info edited_updates=edited_updates) /data/bots/.local/lib/python3.7/site-packages/telegram/ext/regexhandler.py:121: TelegramDeprecationWarning: edited_updates is deprecated. See https://git.io/fxJuV for more info edited_updates=edited_updates) /data/bots/Bob/tg_bot/modules/helper_funcs/handlers.py:56: TelegramDeprecationWarning: edited_updates is deprecated. See https://git.io/fxJuV for more info super().__init__(filters, callback, **kwargs)
Thanks in advance
apna loda apni maa ko deta jake beta chutiye madrchod tu case solve krne ka 500 lega teri mako bhej ese hi 2000 de dunga or tere jesa dusra peda ho jayega
Below Is A ScreenShot Of How The Bug Looks Like When I Input A Welcome Message With Rules it gives a weird bug to the welcome message
Ive just loaded the afk module but i keep hitting an error
Traceback (most recent call last):
File "/home/tgbot/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
cursor, statement, parameters, context
File "/home/tgbot/.local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
cursor.execute(statement, parameters)
psycopg2.errors.UndefinedColumn: column afk_users.time does not exist
LINE 1: ...ers_is_afk, afk_users.reason AS afk_users_reason, afk_users....
^
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/tgbot/tg/tg_bot/main.py", line 116, in
imported_module = importlib.import_module("tg_bot.modules." + module_name)
File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/tgbot/tg/tg_bot/modules/afk.py", line 11, in
from tg_bot.modules.sql import afk_sql as sql
File "/home/tgbot/tg/tg_bot/modules/sql/afk_sql.py", line 97, in
__load_afk_users()
File "/home/tgbot/tg/tg_bot/modules/sql/afk_sql.py", line 89, in __load_afk_users
all_afk = SESSION.query(AFK).all()
File "/home/tgbot/.local/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3373, in all
return list(self)
File "/home/tgbot/.local/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3535, in iter
return self._execute_and_instances(context)
File "/home/tgbot/.local/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3560, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/home/tgbot/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
return meth(self, multiparams, params)
File "/home/tgbot/.local/lib/python3.7/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/home/tgbot/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1130, in _execute_clauseelement
distilled_params,
File "/home/tgbot/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1317, in execute_context
e, statement, parameters, cursor, context
File "/home/tgbot/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1511, in handle_dbapi_exception
sqlalchemy_exception, with_traceback=exc_info[2], from=e
File "/home/tgbot/.local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 182, in raise
raise exception
File "/home/tgbot/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
cursor, statement, parameters, context
File "/home/tgbot/.local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedColumn) column afk_users.time does not exist
LINE 1: ...ers_is_afk, afk_users.reason AS afk_users_reason, afk_users....
^
[SQL: SELECT afk_users.user_id AS afk_users_user_id, afk_users.is_afk AS afk_users_is_afk, afk_users.reason AS afk_users_reason, afk_users.time AS afk_users_time
FROM afk_users]
(Background on this error at: http://sqlalche.me/e/13/f405)
Can anyone help?
I wanted to ask that...
Just type your question here [.can u find the error ? .]
i just forked your codes and edited in my way . with a name only . balence codes are not changed till now . but , the deployment time , in heroku shown a message as "No app.json located in the repo URL provided"
but file have in there . i can show my evidences and
i can share my app"s url ,pls check and help to solve the problem
my repo url : https://github.com/sakhaavvaavaj93/saithan_Robot.git
and pls checkout the attached document
and pls checkout the attached document
![Uploading Screenshot_2020-10-22-00-35-24-414_com.cloudmosa.puffinFree.
Describe the bug
{mention} doesnt mention the user in filters and notes, just prints the name
Expected behavior
It should mention the user.
Using cached https://files.pythonhosted.org/packages/f8/89/c9ab40530fb9142890a79bf39b6f2ee47c311729358794719acd15974e68/alphabet-detector-0.0.7.tar.gz
Collecting pyrate-limiter (from -r requirements.txt (line 31))
Could not find a version that satisfies the requirement pyrate-limiter (from -r requirements.txt (line 31)) (from versions: )
No matching distribution found for pyrate-limiter (from -r requirements.txt (line 31))
requirements pyrate-limiter
centos7
KR$NA ke naam se sade ye
Jaise in saalo ko Geeta pasand nahi
When a loop specifies no break statement, the else clause will always execute when the loop sequence is empty, thus making it useless. It is recommended to have the statements under else in the same scope as the loop itself. If the else clause should not always execute at the โฆ
There are 2 occurrences of this issue in the repository.
See all occurrences on DeepSource โ deepsource.io/gh/AnimeKaizoku/SaitamaRobot/issue/PYL-W0120/occurrences/
Describe the bug
When Saitama promotes a bot, it cant demote it back.
Even when Saitama is the bot that promoted it.
Happens when the target is a bot
To Reproduce
Steps to reproduce the behavior:
Promote a bot using saitama
Try to demote it
Bot wont demote and saitama will deny to recognise the bot
This issue is currently WIP, stay tuned for updates. Currently, I'm drafting this issue and I submitted it, just to avoid losing my work while watching the Doors 5 premiere (sorry, I just watching the replay).
The Spam Protection V2 changelog: https://t.me/Intellivoid/328
Lookup API Documentation: https://docs.intellivoid.net/spamprotection/v1/lookup
I wanted to ask that...
Just type your question here [...]
ive been having troubling deploying and im getting an error from filters.py in helper_funcs...
[root@server SaitamaRobot]# python3 -m SaitamaRobot
Traceback (most recent call last):
File "/usr/lib64/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib64/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib64/python3.6/runpy.py", line 109, in _get_module_details
import(pkg_name)
File "/root/SaitamaRobot/SaitamaRobot/init.py", line 5, in
import spamwatch
ModuleNotFoundError: No module named 'spamwatch'
[root@server SaitamaRobot]#
SaitamaRobot all fork this is a same problem ModuleNotFoundError: No module named 'spamwatch'
The disasters module isn't working properly..
When adding a user the bot doesn't return any messages or remove them from the old category.
It shows demote messages and the message if user is in the same category your trying to add it to. Also some messages showing if the user your demoting is in DRAGONS
Replies like:
takes away all the fun.
Though replies like:
are more fun.
Thanks for reading. I hope this will be considered.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.