Do not traverse the lists by hand, use get_*_by_id functions from discord-util. This adds get_user_by_id and changes get_channel_by_id to traverse all servers in case no server is specified.
Split this huge prototyping mess in a single lump into separate files. Better do this early then never.