Twitch bot unable to /mod /unmod but can use /timeout /ban /slow

I can send the following command for example
“PRIVMSG #channelName .timeout username 1”
the above will “purge” messages for the user and it successfully purges the messages from said user.

but if I wish to mod a user or unmod them for example
“PRIVMSG #channelName .mod username”
it doesnt mod said username not also if i use unmod it doesnt unmod them either.

Is this a limitation or users not connected to the web irc? or am i using the wrong command?

Only the broadcaster account can mod and unmod users. So if you are trying with a mod account it will not work.