|
1 | 1 | local commands = {
|
2 | 2 | build = function() require('cord.update').build() end,
|
3 | 3 | fetch = function() require('cord.update').fetch() end,
|
4 |
| - show_presence = function() require('cord').manager:resume() end, |
5 |
| - hide_presence = function() require('cord').manager:hide() end, |
6 |
| - toggle_presence = function() require('cord').manager:toggle() end, |
7 |
| - idle = function() require('cord').manager:force_idle() end, |
8 |
| - unidle = function() require('cord').manager:unforce_idle() end, |
9 |
| - toggle_idle = function() require('cord').manager:toggle_idle() end, |
10 |
| - clear_presence = function() require('cord').manager:clear_activity() end, |
| 4 | + show_presence = function() |
| 5 | + local cord = require 'cord' |
| 6 | + if cord.manager then cord.manager:resume() end |
| 7 | + end, |
| 8 | + hide_presence = function() |
| 9 | + local cord = require 'cord' |
| 10 | + if cord.manager then cord.manager:hide() end |
| 11 | + end, |
| 12 | + toggle_presence = function() |
| 13 | + local cord = require 'cord' |
| 14 | + if cord.manager then cord.manager:toggle() end |
| 15 | + end, |
| 16 | + idle = function() |
| 17 | + local cord = require 'cord' |
| 18 | + if cord.manager then cord.manager:force_idle() end |
| 19 | + end, |
| 20 | + unidle = function() |
| 21 | + local cord = require 'cord' |
| 22 | + if cord.manager then cord.manager:unforce_idle() end |
| 23 | + end, |
| 24 | + toggle_idle = function() |
| 25 | + local cord = require 'cord' |
| 26 | + if cord.manager then cord.manager:toggle_idle() end |
| 27 | + end, |
| 28 | + clear_presence = function() |
| 29 | + local cord = require 'cord' |
| 30 | + if cord.manager then cord.manager:clear_activity(true) end |
| 31 | + end, |
11 | 32 | restart = function()
|
12 | 33 | local cord = require 'cord'
|
13 | 34 |
|
|
0 commit comments