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
87a15a85
Commit
87a15a85
authored
2 years ago
by
dnns01
Browse files
Options
Downloads
Patches
Plain Diff
Fix giveaway
parent
236071b6
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
twitchbot/giveaway.py
+10
-9
10 additions, 9 deletions
twitchbot/giveaway.py
with
10 additions
and
9 deletions
twitchbot/giveaway.py
+
10
−
9
View file @
87a15a85
...
...
@@ -58,7 +58,7 @@ class Giveaway(commands.Cog):
winner
=
random
.
choice
(
list
(
self
.
giveaway_entries
))
del
self
.
giveaway_entries
[
winner
]
msg
=
f
"
Es wurde aus
{
entry_count
}
Einträgen ausgelost. Und der Gewinner ist... @
{
winner
}
"
\
if
entry_count
==
1
\
if
entry_count
>
1
\
else
f
"
Es gab nur eine Person im Lostopf. Natürlich ist der Gewinner @
{
winner
}
...
"
\
f
"
Woooow... was eine Überraschung
"
await
self
.
bot
.
send_announce
(
ctx
,
msg
)
...
...
@@ -67,11 +67,12 @@ class Giveaway(commands.Cog):
@routines.routine
(
minutes
=
5
)
async
def
giveaway_loop
(
self
):
if
self
.
just_started
:
self
.
just_started
=
False
else
:
entry_count
=
len
(
self
.
giveaway_entries
)
await
self
.
bot
.
send_announce
(
self
.
bot
.
channel
(),
f
"
Einfach nur Krank!!! Hier wird schon wieder übelster Schrott rausgehauen.
"
f
"
Es haben bereits
{
entry_count
}
Zuschis ihren Namen in den Lostopf geworfen.
"
f
"
Schreibe JETZT !gierig in den Chat, um auch am Giveaway teilzunehmen!
"
)
if
self
.
giveaway_enabled
:
if
self
.
just_started
:
self
.
just_started
=
False
else
:
entry_count
=
len
(
self
.
giveaway_entries
)
await
self
.
bot
.
send_announce
(
self
.
bot
.
channel
(),
f
"
Einfach nur Krank!!! Hier wird schon wieder übelster Schrott rausgehauen.
"
f
"
Es haben bereits
{
entry_count
}
Zuschis ihren Namen in den Lostopf geworfen.
"
f
"
Schreibe JETZT !gierig in den Chat, um auch am Giveaway teilzunehmen!
"
)
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