mirror of
https://github.com/Luzifer/discord-community.git
synced 2024-11-09 15:40:03 +00:00
Wiki: Improve examples with code tags
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
690365f56b
commit
124a65bcfd
2 changed files with 4 additions and 4 deletions
|
@ -173,7 +173,7 @@ func (m modStreamSchedule) cronUpdateSchedule() {
|
|||
}
|
||||
|
||||
func (m modStreamSchedule) formatTime(t time.Time) string {
|
||||
// @attr timezone optional string "UTC" Timezone to display the times in (e.g. "Europe/Berlin")
|
||||
// @attr timezone optional string "UTC" Timezone to display the times in (e.g. `Europe/Berlin`)
|
||||
tz, err := time.LoadLocation(m.attrs.MustString("timezone", ptrString("UTC")))
|
||||
if err != nil {
|
||||
log.WithError(err).Fatal("Unable to load timezone")
|
||||
|
@ -181,7 +181,7 @@ func (m modStreamSchedule) formatTime(t time.Time) string {
|
|||
|
||||
return localeStrftime(
|
||||
t.In(tz),
|
||||
// @attr time_format optional string "%b %d, %Y %I:%M %p" Time format in [limited strftime format](https://github.com/Luzifer/discord-community/blob/master/strftime.go) to use (e.g. "%a. %d.%m. %H:%M Uhr")
|
||||
// @attr time_format optional string "%b %d, %Y %I:%M %p" Time format in [limited strftime format](https://github.com/Luzifer/discord-community/blob/master/strftime.go) to use (e.g. `%a. %d.%m. %H:%M Uhr`)
|
||||
m.attrs.MustString("time_format", ptrString("%b %d, %Y %I:%M %p")),
|
||||
// @attr locale optional string "en_US" Locale to translate the date to ([supported locales](https://github.com/goodsign/monday/blob/24c0b92f25dca51152defe82cefc7f7fc1c92009/locale.go#L9-L49))
|
||||
m.attrs.MustString("locale", ptrString("en_US")),
|
||||
|
|
|
@ -147,8 +147,8 @@ Posts stream schedule derived from Twitch schedule as embed in Discord channel
|
|||
| `locale` | | string | `en_US` | Locale to translate the date to ([supported locales](https://github.com/goodsign/monday/blob/24c0b92f25dca51152defe82cefc7f7fc1c92009/locale.go#L9-L49)) |
|
||||
| `schedule_entries` | | int64 | `5` | How many schedule entries to add to the embed as fields |
|
||||
| `schedule_past_time` | | duration | `15m` | How long in the past should the schedule contain an entry |
|
||||
| `time_format` | | string | `%b %d, %Y %I:%M %p` | Time format in [limited strftime format](https://github.com/Luzifer/discord-community/blob/master/strftime.go) to use (e.g. "%a. %d.%m. %H:%M Uhr") |
|
||||
| `timezone` | | string | `UTC` | Timezone to display the times in (e.g. "Europe/Berlin") |
|
||||
| `time_format` | | string | `%b %d, %Y %I:%M %p` | Time format in [limited strftime format](https://github.com/Luzifer/discord-community/blob/master/strftime.go) to use (e.g. `%a. %d.%m. %H:%M Uhr`) |
|
||||
| `timezone` | | string | `UTC` | Timezone to display the times in (e.g. `Europe/Berlin`) |
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue