mehdisadeghi / clashogram Goto Github PK
View Code? Open in Web Editor NEWClash of Clans war monitoring for telegram channels.
License: MIT License
Clash of Clans war monitoring for telegram channels.
License: MIT License
It would be great to monitor 'war league' if the clan participates in it. There is an API for this:
Retrieve information about clan's current clan war league group
Retrieve information about individual clan war league war
I did successfully install clashogram but after some days it did stop working
this is what I get when I try to start it
Traceback (most recent call last):
File "/usr/local/bin/clashogram.py", line 723, in
main()
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/bin/clashogram.py", line 48, in main
monitor_currentwar(coc_token, clan_tag, bot_token, channel_name)
File "/usr/local/bin/clashogram.py", line 59, in monitor_currentwar
warinfo = coc_api.get_currentwar(clan_tag)
File "/usr/local/bin/clashogram.py", line 128, in get_currentwar
return WarInfo(self.call_api(self.get_currentwar_endpoint(clan_tag)))
File "/usr/local/bin/clashogram.py", line 141, in call_api
raise Exception('Error calling CoC API: %s' % res)
When I try to install clashogram by executing command pip install clashogram
I receive this error:
Collecting clashogram
Downloading https://files.pythonhosted.org/packages/0d/03/6e93ffce33acbbbd16ce4ed4e883b3328cb0a96f535855d0d87ad0db7b6c/Clashogram-0.2.4.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-cWbym_/clashogram/setup.py", line 7, in
long_description=open('README.rst', encoding='utf-8').read(),
TypeError: 'encoding' is an invalid keyword argument for this function----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-cWbym_/clashogram/
How can I fix it?
I want that the script/bot is monitoring in group(s) so I tried to change the script and removed the @
in line 110. I used the Group-ID instead of the channel name but nothing happend after executing the script. No errors or whatever. Sending manual messages through the bot works well. I decided to let the bot posting into a channel again but I noticed that the bot is no longer minitors anything. I took another box. I cloned the scripted again via git and installed everything on a fresh VPS etc but nothing. Is this a known "bug"? The last time I used this script was approximately a year ago and it was working :(
It's all the same. Same clan, same tokens.
Please Help.
First of all thank you for this nice script. Is there and chance to remove the attack infos and only post war begin and war end? Some clanmates leave my channel because of spamming.
Thank You for your help.
If clan location is not set ("Not set" in the clan description) then clashogram fails with the following error:
Traceback (most recent call last):
File "/opt/clashogram/venv/bin/clashogram", line 8, in
sys.exit(main())
File "/opt/clashogram/venv/lib64/python3.6/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/opt/clashogram/venv/lib64/python3.6/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/opt/clashogram/venv/lib64/python3.6/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/clashogram/venv/lib64/python3.6/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/opt/clashogram/venv/lib64/python3.6/site-packages/clashogram/main.py", line 82, in main
monitor.start()
File "/opt/clashogram/venv/lib64/python3.6/site-packages/clashogram/main.py", line 262, in start
self.update()
File "/opt/clashogram/venv/lib64/python3.6/site-packages/clashogram/main.py", line 144, in update
self.send_preparation_msg()
File "/opt/clashogram/venv/lib64/python3.6/site-packages/clashogram/main.py", line 173, in send_preparation_msg
self.msg_factory.create_preparation_msg(),
File "/opt/clashogram/venv/lib64/python3.6/site-packages/clashogram/formatters.py", line 49, in create_preparation_msg
oploc=op_extra_info.location,
File "/opt/clashogram/venv/lib64/python3.6/site-packages/clashogram/models.py", line 11, in location
return self.data['location']['name']
KeyError: 'location'
Traceback (most recent call last):
File "/home/a/akula22/clashogram/myenv/bin/clashogram.py", line 747, in
main()
File "/home/a/akula22/clashogram/myenv/lib/python3.4/site-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/home/a/akula22/clashogram/myenv/lib/python3.4/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/a/akula22/clashogram/myenv/lib/python3.4/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/a/akula22/clashogram/myenv/lib/python3.4/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/a/akula22/clashogram/myenv/bin/clashogram.py", line 53, in main
monitor_currentwar(coc_token, clan_tag, bot_token, channel_name, forever, mute_attacks)
File "/home/a/akula22/clashogram/myenv/bin/clashogram.py", line 64, in monitor_currentwar
warinfo = coc_api.get_currentwar(clan_tag)
File "/home/a/akula22/clashogram/myenv/bin/clashogram.py", line 151, in get_currentwar
return WarInfo(self.call_api(self.get_currentwar_endpoint(clan_tag)))
File "/home/a/akula22/clashogram/myenv/bin/clashogram.py", line 163, in call_api
raise Exception('Error calling CoC API: %s' % res)
Exception: Error calling CoC API: <Response [403]>
or
Exception: Error calling CoC API: <Response [404]>
help plz можно по русски?
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.