presence.nvim icon indicating copy to clipboard operation
presence.nvim copied to clipboard

Temporary disabling

Open boltlessengineer opened this issue 2 years ago • 3 comments

To be honest, some times I just leave neovim open and don't use it.

Can I disable Discord status messages for temporary?

I figured out I can use require('presence'):stop() to disabling, but I don't know how to reconnect it.

boltlessengineer avatar Feb 15 '23 08:02 boltlessengineer

so i've been digging the code and i think if you just set the

local  presence = require('presence')
presence.is_authorized = false
presence.is_authorizing = false
presence.is_connected = false
presence.is_connecting = false

this should automatically work

:lua local p = require('presence'); p.is_authorized = false; p.is_authorizing = false; p.is_connected = false; p.is_connecting = false

from what i know you first have to connect

require('presence'):connect()

and then authorize

require('presence'):authorize()

however its sometimes works and othertimes doesn't

i007c avatar Feb 17 '23 03:02 i007c

That worked, thanks!

By digging more on my self, I figured out I can just

require('presence'):update()

rather than connect() and authorize.

I'll leave this as open because I'm not sure if this is a right way to do this. I still want official API for temporary stop feature! :)

boltlessengineer avatar Feb 22 '23 07:02 boltlessengineer

This would be pretty useful.

StaticESC avatar Apr 15 '23 21:04 StaticESC