NightDev Community Forums

Change Message Text

Hi

i wish to change return message of the command.

Example:
!game will return “night is playing League of Legends”

!game should return "My current game is League of Legends for 1 h an 34 minutes "

Thank you for your efforts!

Gizmou

Please refer to our documentation at https://docs.nightbot.tv/commands/variables/twitch to learn about formatting for the Twitch variable.

thanks for that link. i read that before i post.

Command: !uptime Stream läuft seit: $(twitch $(channel) “{{uptimeLength}}”)
Return: Stream läuft seit: 2 hours 1 minute 41 seconds
should Return: Stream läuft seit: 2 Stunden 1 Minute 41 Sekunden

Unfortunately Nightbot is not translated at this time, but it’s something we wish to support in the future.

@gizmou123

Wrote some eval to translate the uptime to German.

!addcom -cd=5 !uptime $(eval `$(twitch $(channel) "{{uptimeLength}}")`.split(` `).map(a=>a.charAt(a.length-1)==`s`?a.slice(0,a.length-1):a).join(` `).replace(`year`,`Jahre`).replace(`month`,`Monate`).replace(`day`,`Tage`).replace(`hour`,`Stunden`).replace(`minute`,`Minuten`).replace(`second`,`Sekunden`))

omg it’s too difficult to reproduce. It seems to me that are regular expressions.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.