Why are you posting this here. That is a feature that has already been implemented into discord. If you are having problems getting it to work, then post in the help section or better yet, ask in a discord thread
honestly, i just want osu to show what beatmap im playing on discord
I don't think that feature works on Mac at all, since osu! on Mac is literally just a Wine wrapper around the Windows version. It wouldn't be able to communicate outside of that to the Discord app on Mac.