Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
maubot-ethzlunch
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
isgphys
maubot-ethzlunch
Commits
739731b6
Commit
739731b6
authored
5 years ago
by
Tulir Asokan
Browse files
Options
Downloads
Patches
Plain Diff
Remove cancel command. Fixes #7
parent
0a0f2ef9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
reminder/bot.py
+0
-10
0 additions, 10 deletions
reminder/bot.py
with
0 additions
and
10 deletions
reminder/bot.py
+
0
−
10
View file @
739731b6
...
@@ -179,16 +179,6 @@ class ReminderBot(Plugin):
...
@@ -179,16 +179,6 @@ class ReminderBot(Plugin):
def
format_time
(
self
,
evt
:
MessageEvent
,
reminder
:
ReminderInfo
)
->
str
:
def
format_time
(
self
,
evt
:
MessageEvent
,
reminder
:
ReminderInfo
)
->
str
:
return
format_time
(
reminder
.
date
.
astimezone
(
self
.
db
.
get_timezone
(
evt
.
sender
)))
return
format_time
(
reminder
.
date
.
astimezone
(
self
.
db
.
get_timezone
(
evt
.
sender
)))
@remind.subcommand
(
"
cancel
"
,
help
=
"
Cancel a reminder
"
,
aliases
=
(
"
delete
"
,
"
remove
"
,
"
rm
"
))
@command.argument
(
"
id
"
,
parser
=
lambda
val
:
int
(
val
)
if
val
else
None
,
required
=
True
)
async
def
cancel
(
self
,
evt
:
MessageEvent
,
id
:
int
)
->
None
:
reminder
=
self
.
db
.
get
(
id
)
if
self
.
db
.
remove_user
(
reminder
,
evt
.
sender
):
await
evt
.
reply
(
f
"
Reminder for
\"
{
reminder
.
message
}
\"
"
f
"
{
self
.
format_time
(
evt
,
reminder
)
}
**cancelled**
"
)
else
:
await
evt
.
reply
(
"
You weren
'
t subscribed to that reminder.
"
)
@remind.subcommand
(
"
timezone
"
,
help
=
"
Set your timezone
"
,
aliases
=
(
"
tz
"
,))
@remind.subcommand
(
"
timezone
"
,
help
=
"
Set your timezone
"
,
aliases
=
(
"
tz
"
,))
@command.argument
(
"
timezone
"
,
parser
=
parse_timezone
,
required
=
False
)
@command.argument
(
"
timezone
"
,
parser
=
parse_timezone
,
required
=
False
)
async
def
timezone
(
self
,
evt
:
MessageEvent
,
timezone
:
pytz
.
timezone
)
->
None
:
async
def
timezone
(
self
,
evt
:
MessageEvent
,
timezone
:
pytz
.
timezone
)
->
None
:
...
...
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