concommand.Run() called when player joins, but doesn't run the command

I’m coding a basic gamemdoe for my own amusement, and I’ve been following a tutorial which has 3 teams, with a popup window to select team when a player joins. However, when I join my test server, I get the error “command team_menu” not found. If I then open console and enter “team_menu” (without quotes), it works the way it should. I’m not sure why the command isn’t initializing when the player joins, but it doesn’t work.

My code:
In init.lua:

include( "shared.lua" )

function GM:PlayerInitialSpawn( ply )
	ply:SetTeam( 1 )
	concommand.Run( ply, "team_menu" )

In cl_init.lua:

include( "shared.lua" )

concommand.Add( "team_menu", function()
	--My code for the team chooser window

From the old Garry’s Mod wiki:

Instead use this,

Worked like a charm, thanks!