Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
moneroJobsBot
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lh1008
moneroJobsBot
Commits
d8cf2d31
Commit
d8cf2d31
authored
4 years ago
by
lh1008
💬
Browse files
Options
Downloads
Patches
Plain Diff
First Welcome message bot start-command
parent
d8eb9478
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
monerojobs.py
+23
-0
23 additions, 0 deletions
monerojobs.py
with
23 additions
and
0 deletions
monerojobs.py
0 → 100644
+
23
−
0
View file @
d8cf2d31
#!/usr/bin/python3
"""
Module that displays first start bot message
"""
import
logging
from
telegram.ext
import
CommandHandler
from
telegram.ext
import
Update
updater
=
Updater
(
token
=
''
,
use_context
=
True
)
dispatcher
=
updater
.
dispatcher
logging
.
basicConfig
(
format
=
'
%(asctime)s - %(name)s - %(levelname)s - %(message)s
'
,
level
=
logging
.
INFO
)
def
start
(
update
,
context
):
"""
Method to send start message
"""
context
.
bot
.
send_message
(
chat_id
=
update
.
effective_chat
.
id
,
text
=
"
I
'
m moneroJobsBot, we
'
re building!
"
)
start_handler
=
CommandHandler
(
'
start
'
,
start
)
dispatcher
.
add_handler
(
start_handler
)
updater
.
start_polling
()
update
.
stop
()
if
__name__
==
"
__main__
"
:
start
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment