Skip to content

Instantly share code, notes, and snippets.

View CoolnsX's full-sized avatar

Tanveer Ahmed Ansari CoolnsX

View GitHub Profile
CoolnsX /
Created October 28, 2023 09:04
Implementation of DIscord Rich presence in posix shell script, not depenedent upon python or any other programming language
### Posix compliant script for Discord Rich presence (no need to have python and pypresence) ###
#encode opcode and payload length in little-endian format and prepend it with payload
encode_data() {
for i in $(seq 0 3); do
byte=$(((op >> (i * 8)) & 255))