Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
strolchibot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container 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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dnns01
strolchibot
Commits
5afb89c9
Commit
5afb89c9
authored
3 years ago
by
Dennis Klein
Browse files
Options
Downloads
Patches
Plain Diff
Add confirmations when sending !gierig, to take part in the giveaway
parent
1eefd225
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
twitchbot/giveaway.py
+6
-1
6 additions, 1 deletion
twitchbot/giveaway.py
twitchbot/link_protection.py
+1
-1
1 addition, 1 deletion
twitchbot/link_protection.py
twitchbot/scarecounter.py
+2
-2
2 additions, 2 deletions
twitchbot/scarecounter.py
with
9 additions
and
4 deletions
twitchbot/giveaway.py
+
6
−
1
View file @
5afb89c9
...
...
@@ -14,8 +14,13 @@ class Giveaway:
async
def
cmd_giveaway
(
self
,
ctx
):
"""
take part at the giveaway
"""
texts
=
[
f
"
{
ctx
.
author
.
name
}
ist ein gieriger Gierlappen!
"
,
f
"
Geil!!!
{
ctx
.
author
.
name
}
giert hart rein!
"
,
f
"
So klappt es doch
{
ctx
.
author
.
name
}
! Einmal hart reingieren.
"
]
if
self
.
giveaway_enabled
:
self
.
giveaway_entries
[
ctx
.
author
.
name
]
=
1
if
self
.
giveaway_entries
.
get
(
ctx
.
author
.
name
)
!=
1
:
await
self
.
bot
.
send_me
(
ctx
,
random
.
choice
(
texts
),
"
YellowGreen
"
)
self
.
giveaway_entries
[
ctx
.
author
.
name
]
=
1
@commands.command
(
name
=
"
giveaway
"
)
async
def
cmd_giveaway_open
(
self
,
ctx
,
param
):
...
...
This diff is collapsed.
Click to expand it.
twitchbot/link_protection.py
+
1
−
1
View file @
5afb89c9
...
...
@@ -76,7 +76,7 @@ class LinkProtection:
def
is_user_whitelisted
(
self
,
user
):
if
self
.
has_user_permanent_permit
(
user
):
return
True
elif
until
:
=
self
.
permit
.
get
(
user
.
name
):
elif
until
:
=
self
.
permit
.
get
(
user
.
name
.
lower
()
):
return
until
>=
datetime
.
now
()
else
:
return
False
...
...
This diff is collapsed.
Click to expand it.
twitchbot/scarecounter.py
+
2
−
2
View file @
5afb89c9
...
...
@@ -5,7 +5,7 @@ from twitchio.ext import commands
class
ScareCounter
:
def
__init__
(
self
,
bot
):
self
.
bot
=
bot
self
.
scarecount
=
1
1
self
.
scarecount
=
1
8
@commands.command
(
name
=
"
scarecount
"
)
async
def
cmd_scarecount
(
self
,
ctx
,
add
=
None
):
...
...
@@ -14,4 +14,4 @@ class ScareCounter:
elif
add
==
"
--
"
:
self
.
scarecount
-=
1
await
ctx
.
send
(
f
"
Shawna und Marcus haben sich schon
{
self
.
scarecount
}
mal ge
grusel
t 👻👻👻
"
)
await
ctx
.
send
(
f
"
Shawna und Marcus haben sich schon
{
self
.
scarecount
}
mal ge
BRRRRRRRR
t 👻👻👻
"
)
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