Skip to content

Commit fbac850

Browse files
author
hi-hi-ray
committed
🚧 Adiciona esqueleto do bot
1 parent 72cca90 commit fbac850

9 files changed

Lines changed: 225 additions & 0 deletions

File tree

.gitignore

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
28+
# PyInstaller
29+
# Usually these files are written by a python script from a template
30+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31+
*.manifest
32+
*.spec
33+
34+
# Installer logs
35+
pip-log.txt
36+
pip-delete-this-directory.txt
37+
38+
# Unit test / coverage reports
39+
htmlcov/
40+
.tox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*,cover
47+
.hypothesis/
48+
49+
# Translations
50+
*.mo
51+
*.pot
52+
53+
# Django stuff:
54+
*.log
55+
local_settings.py
56+
57+
# Flask stuff:
58+
instance/
59+
.webassets-cache
60+
61+
# Scrapy stuff:
62+
.scrapy
63+
64+
# Sphinx documentation
65+
docs/_build/
66+
67+
# PyBuilder
68+
target/
69+
70+
# Jupyter Notebook
71+
.ipynb_checkpoints
72+
73+
# pyenv
74+
.python-version
75+
76+
# celery beat schedule file
77+
celerybeat-schedule
78+
79+
# SageMath parsed files
80+
*.sage.py
81+
82+
# dotenv
83+
.env
84+
85+
# virtualenv
86+
.venv
87+
venv/
88+
ENV/
89+
90+
# Spyder project settings
91+
.spyderproject
92+
93+
# Rope project settings
94+
.ropeproject
95+
96+
#Idea PyCharm:
97+
.idea/*
98+
99+
#Config:
100+
*.ini

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# PythonRio Bot
2+

python/main.py

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# -*- coding: UTF-8 -*-
2+
3+
from telegram.ext import Updater, CommandHandler
4+
5+
def start(update):
6+
update.message.reply_text('Força Python!')
7+
8+
def evento(update):
9+
update.message.reply_text('Força Python!')
10+
11+
12+
def regras(update):
13+
update.message.reply_text('Força Python!')
14+
15+
16+
def help(update):
17+
update.message.reply_text('Força Python!')
18+
19+
20+
def link(update):
21+
update.message.reply_text('Força Python!')
22+
23+
24+
def grupy(update):
25+
update.message.reply_text('Força Python!')
26+
27+
28+
def niteroi(update):
29+
update.message.reply_text('Força Python!')
30+
31+
32+
def pyladies(update):
33+
update.message.reply_text('Força Python!')
34+
35+
updater = Updater('YOUR TOKEN HERE')
36+
37+
updater.dispatcher.add_handler(CommandHandler('start', start))
38+
updater.dispatcher.add_handler(CommandHandler('evento', evento))
39+
updater.dispatcher.add_handler(CommandHandler('regras', regras))
40+
updater.dispatcher.add_handler(CommandHandler('help', help))
41+
updater.dispatcher.add_handler(CommandHandler('link', link))
42+
updater.dispatcher.add_handler(CommandHandler('grupy', grupy))
43+
updater.dispatcher.add_handler(CommandHandler('niteroi', niteroi))
44+
updater.dispatcher.add_handler(CommandHandler('pyladies', pyladies))
45+
46+
updater.start_polling()
47+
updater.idle()

python/src/messages/eventos.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# -*- coding: UTF-8 -*-
2+
3+
4+
def event_text():
5+
event = 'Prezados, \n' \
6+
'Dia 25 de Março de 2017 vai acontencer o ' \
7+
'próximo Encontro da @pythonrio, ainda não temos um local definido. \n' \
8+
'[Palestrantes] \n' \
9+
'Em breve inscrições'\
10+
'[Participante] \n'\
11+
'As inscrições ainda não começaram, mas assim que começar iremos Avisar. \n'\
12+
'Grande abraço! \n' \
13+
'@pythonrio\n'\
14+
'#forcapython'
15+
return event

python/src/messages/grupy.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# -*- coding: UTF-8 -*-
2+
3+
4+
def event_text():
5+
event = 'GruPy!!! \n' \
6+
'Em breve teremos o GruPy, que ocorrerá em Nova Iguaçu. \n' \
7+
'Para mais informações, fique atento: http://pythonrio.python.org.br/grupy-granderio \n'
8+
return event

python/src/messages/help.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# -*- coding: UTF-8 -*-
2+
3+
4+
def help_text():
5+
help = 'Olá! Segue os meus comandos básico: \n' \
6+
'/start - Digo: Força Python! \n' \
7+
'/evento - Situação Atual do evento do PyhtonRio. \n' \
8+
'/grupy - Falo sobre o GruPy. \n'\
9+
'/niteroi - Falo sobre o PythonRio Niteroi. \n'\
10+
'/pyladies - Falo sobre o Pyladies. \n'\
11+
'/regras - Falo as regras do grupo. \n'\
12+
'/link - Falo os links. \n' \
13+
'/help - Digo os comandos. \n'
14+
return help

python/src/messages/niteroi.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# -*- coding: UTF-8 -*-
2+
3+
4+
def niteroi_text():
5+
niteroi = 'PythonRio Niterói!!! \n'\
6+
'Ih! Já aconteceu, em breve outra mensagem aqui'
7+
return niteroi

python/src/messages/pyladies.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# -*- coding: UTF-8 -*-
2+
3+
4+
def pyladies_text():
5+
pyladies = 'PyLadies! \n' \
6+
'[Evento] \n'\
7+
'No momento não temos nenhum evento marcado, mas se quiser saber ' \
8+
'algumas informações sobre o grupo, pode mander um ' \
9+
'e-mail para [email protected] que sanaremos sua dúvida. \n' \
10+
'[Lojinha] \n' \
11+
'Temos uma lojinha que surgiu da necessidade de levantar fundos, 100% do lucro ' \
12+
'obtido é destinado às atividades com a comunidade, como workshops para mulheres. \n'\
13+
'Caso queira nos ajudar, segue o endereço da nossa loja. \n'\
14+
'Loja = http://pyladiesbrasil.iluria.com/ \n'\
15+
'Site do Pyladies Brasil = http://brasil.pyladies.com/ \n'\
16+
17+
return pyladies

python/src/messages/rules.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# -*- coding: UTF-8 -*-
2+
3+
4+
def rules_text():
5+
rules = 'Regras: \n' \
6+
'Não farás Pyratarias. Temos um clube do livro, confira em /link, Distribua conteúdo livre. \n' \
7+
'Não ofenderás o Coleguinha, Não aceitamos discriminação de qualquer tipo. \n' \
8+
'Não mandarás nudes, Somos pythonistas só nos excitamos com código. \n' \
9+
'Nao mandarás porno, mesmo que the internet is for porn. \n' \
10+
'Não me invocarás de 1 em 1 minuto. \n' \
11+
'Não pode ser fake, se descobrimos que você é um troll ou' \
12+
'que está aqui para zoar, te baniremos desse reino. \n' \
13+
'Evitarás mensagens que não sejam de interesse comum do grupo. \n' \
14+
'Falarás do PythonRio para os coleguinhas. \n'
15+
return rules

0 commit comments

Comments
 (0)