func (g *Guild) DeleteRoleByID(ID Snowflake) {
	g.Lock()
	defer g.Unlock()

	index := -1
	for i, r := range g.Roles {
		if r.ID == ID {
			index = i
			break
		}
	}

	if index != -1 {
		// delete the entry
		g.Roles[index] = g.Roles[len(g.Roles)-1]
		g.Roles[len(g.Roles)-1] = nil
		g.Roles = g.Roles[:len(g.Roles)-1]
	}
}
// DeleteRoleByID remove a role from the guild struct
DeleteRoleByID remove a role from the guild struct
// DeleteRoleByID remove a role from the guild struct
func (g *Guild) DeleteRoleByID(ID Snowflake) {
	g.Lock()
	defer g.Unlock()
	index := -1
	for i, r := range g.Roles {
		if r.ID == ID {
			index = i
			break
		}
	}
	if index != -1 {
		g.Roles[index] = g.Roles[len(g.Roles)-1]
		g.Roles[len(g.Roles)-1] = nil
		g.Roles = g.Roles[:len(g.Roles)-1]
	}
}
func ( g * Guild ) DeleteRoleByID ( ID Snowflake ) { g . Lock ( ) defer g . Unlock ( ) index := - 1 for i , r := range g . Roles { if r . ID == ID { index = i break } } if index != - 1 { g . Roles [ index ] = g . Roles [ len ( g . Roles ) - 1 ] g . Roles [ len ( g . Roles ) - 1 ] = nil g . Roles = g . Roles [ : len ( g . Roles ) - 1 ] } }
DeleteRoleByID remove a role from the guild struct
DeleteRoleByID remove a role from the guild struct
// delete the entry