Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathPythonRio-bot-all.rb
More file actions
Latest commit
84 lines (73 loc) · 3.97 KB
/
Copy pathPythonRio-bot-all.rb
File metadata and controls
84 lines (73 loc) · 3.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# encoding: UTF-8
# coding: UTF-8
# -*- coding: UTF-8 -*-
require'telegram/bot'
token='239201720:AAFA16ppUfKeuwtuwr2JjriHNRgDcEipdbw'
defcheck_member_entrance(message,bot)
ifmessage.new_chat_member
bot.api.send_message(chat_id: message.chat.id,text:"E aí, #{message.new_chat_member.first_name}, tudo bem? Seja muito bem-vind@ ao grupo PythonRio. Fique à vontade para consultar as nossas \/regras e interagir com a galera!")
end
end
Telegram::Bot::Client.run(token)do |bot|
bot.listendo |message|
check_member_entrance(message,bot)
casemessage.text
when'/start'
bot.api.send_message(chat_id: message.chat.id,text: "Força Python!")
when'/start@PythonRio_Bot'
bot.api.send_message(chat_id: message.chat.id,text: "Força Python!")
when'/evento'
bot.api.send_message(chat_id: message.chat.id,text: "Prezados,
Dia 27 de Agosto de 2016 vai rolar XII Encontro da @pythonrio. Submeta sua proposta de palestra até dia 20/08/2016 pelo speakerfight http://speakerfight.com/events/xii-encontro-python-rio/
Ainda estamos definindo o local e, assim que soubermos, liberamos em nossa Fan Page os links para a inscrição.
Grande abraço!
#forcapython")
when'/evento@PythonRio_Bot'
bot.api.send_message(chat_id: message.chat.id,text: "Prezados,
Dia 27 de Agosto de 2016 vai rolar XII Encontro da @pythonrio. Submeta sua proposta de palestra até dia 20/08/2016 pelo speakerfight http://speakerfight.com/events/xii-encontro-python-rio/
Ainda estamos definindo o local e, assim que soubermos, liberamos em nossa Fan Page os links para a inscrição.
Grande abraço!
#forcapython")
when'/regras'
bot.api.send_message(chat_id: message.chat.id,text: "Não farás Pyratarias. Temos um clube do livro, confira em link.
Não ofenderás o Coleguinha, Não aceitamos discriminação de qualquer tipo.
Não mandarás nudes, Somos pythonistas só nos excitamos com código.
Nao mandarás porno, mesmo que the internet is for porn
Não me invocarás de 1 em 1 minuto.
Falarás do PythonRio para os coleguinhas.")
when'/regras@PythonRio_Bot'
bot.api.send_message(chat_id: message.chat.id,text: "Não farás Pyratarias. Temos um clube do livro, confira em link.
Não ofenderás o Coleguinha, Não aceitamos discriminação de qualquer tipo.
Não mandarás nudes, Somos pythonistas só nos excitamos com código.
Nao mandarás porno, mesmo que the internet is for porn.
Não me invocarás de 1 em 1 minuto.
Falarás do PythonRio para os coleguinhas.")
when'/help'
bot.api.send_message(chat_id: message.chat.id,text: "Olá! A forma mais correta de me usar a / sem o @PythonRio_Bot:
/start - Digo Força Python!
/evento - Situação Atual do evento.
/regras - Falo as regras do grupo.
/link - Falo os links.
/help - Digo os comandos.")
when'/link'
bot.api.send_message(chat_id: message.chat.id,text: "Facebook = https://www.facebook.com/pythonrio
Twitter = https://www.twitter.com/pythonrio
Telegram = https://telegram.me/joinchat/AONs_ANlfCZRoXOX0QxEzA
YouTube = https://www.youtube.com/channel/UCGl4xDZYUYGg4_aMah32yjQ
Clube do Livro = https://trello.com/invite/b/k75OyRBC/1e822b1c6b177f4cc501c39aa9a64e44/clube-do-livro-pythonrio")
when'/help@PythonRio_Bot'
bot.api.send_message(chat_id: message.chat.id,text: "Olá! A forma mais correta de me usar a / sem o @PythonRio_Bot:
/start - Digo Força Python!
/evento - Situação Atual do evento.
/regras - Falo as regras do grupo.
/link - Falo os links.
/help - Digo os comandos.")
when'/link@PythonRio_Bot'
bot.api.send_message(chat_id: message.chat.id,text: "Facebook = https://www.facebook.com/pythonrio
Twitter = https://www.twitter.com/pythonrio
Telegram = https://telegram.me/joinchat/AONs_ANlfCZRoXOX0QxEzA
YouTube = https://www.youtube.com/channel/UCGl4xDZYUYGg4_aMah32yjQ
Clube do Livro = https://trello.com/invite/b/k75OyRBC/1e822b1c6b177f4cc501c39aa9a64e44/clube-do-livro-pythonrio")
end
end
end