Skip to content

Commit

Permalink
Fix paginator timeout, German supported lang name
Browse files Browse the repository at this point in the history
  • Loading branch information
gdude2002 committed Jul 2, 2021
1 parent 2e7a1d7 commit b6064d0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public object SupportedLocales {
"fr" to FRENCH,
"fr_fr" to FRENCH,

"deutsche" to GERMAN,
"deutsch" to GERMAN,
"german" to GERMAN,
"de" to GERMAN,
"de_de" to GERMAN,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ public abstract class BaseButtonPaginator(
style = ButtonStyle.Secondary

check(defaultCheck)
check { active }

emoji(FIRST_PAGE_EMOJI)

action {
Expand All @@ -94,6 +96,8 @@ public abstract class BaseButtonPaginator(
style = ButtonStyle.Secondary

check(defaultCheck)
check { active }

emoji(LEFT_EMOJI)

action {
Expand All @@ -108,6 +112,8 @@ public abstract class BaseButtonPaginator(
style = ButtonStyle.Secondary

check(defaultCheck)
check { active }

emoji(RIGHT_EMOJI)

action {
Expand All @@ -122,6 +128,8 @@ public abstract class BaseButtonPaginator(
style = ButtonStyle.Secondary

check(defaultCheck)
check { active }

emoji(LAST_PAGE_EMOJI)

action {
Expand All @@ -138,6 +146,7 @@ public abstract class BaseButtonPaginator(
deferredAck = true

check(defaultCheck)
check { active }

label = if (keepEmbed) {
style = ButtonStyle.Primary
Expand Down Expand Up @@ -168,6 +177,7 @@ public abstract class BaseButtonPaginator(
style = ButtonStyle.Secondary

check(defaultCheck)
check { active }

action {
switchGroup(group)
Expand All @@ -181,6 +191,8 @@ public abstract class BaseButtonPaginator(
deferredAck = true

check(defaultCheck)
check { active }

emoji(switchEmoji)

label = if (allGroups.size == 2) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ public class InteractionButtonPaginator(
}

active = false
components.stop()

if (!keepEmbed) {
embedInteraction!!.delete()
Expand All @@ -89,6 +88,7 @@ public class InteractionButtonPaginator(
}

runTimeoutCallbacks()
components.stop()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ public class MessageButtonPaginator(
}

active = false
components.stop()

if (!keepEmbed) {
message!!.delete()
Expand All @@ -99,6 +98,7 @@ public class MessageButtonPaginator(
}

runTimeoutCallbacks()
components.stop()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ suspend fun main() {
add(::TestExtension)

help {
deleteInvocationOnPaginatorTimeout = true
deletePaginatorOnTimeout = true

paginatorTimeout = 5_000L
paginatorTimeout = 5
}
}
}
Expand Down

0 comments on commit b6064d0

Please sign in to comment.