Item spawn codes exist only via mods or TShock server console.
Game console support is limited to Developer Mode in tModLoader.
Command examples include /give itemname quantity and /time night or /day.
Server admin can use /killall slime.
Some modpacks add console macros to automate boss summons.