View Feature Request
SlashCommandHelper.RegisterCommand or Global Access to LibSlashCommander without LibStub
Feature #: 1557
File: EasyTravel
Date: 10/25/16 05:04 PM
By: BlackSwan
Status: Feature not possible
Ok, little bit of description. I am not sure that it feature will be very popular, but here it is why I asking it. One of the features of CraftStore that AlphaLemming proclaimed was "No libs" so for now I trying to continue this ideology and not going add any libs in nearest future. But I interested in your LSC and it will be cool to use it to register some CS commands and add descriptions for them, in case if any other add-on containing that lib was already installed. Like EasyTravel. So, can I get it? :)

RSS 2.0 Feed for Favorite CommentsNotes Sort Options
By: sirinsidiator - 10/26/16 06:28 AM
LibSlashCommander won't work without LibStub, so what you want is pretty much not possible.
However you can detect if LibSlashCommander is available without depending on it like this:

local function InitLibSlashCommander()
if not LibStub then return false end
local LSC = LibStub("LibSlashCommander", true)
if not LSC then return false end
LSC:Register(aliases, callback, description)
return true

if not InitLibSlashCommander() then
-- init like before