Discord API, get_member(user_id) errors
<p>I have this code and i am really curious about why it is not working. The problem is in <code>k = discord.Server.get_member(j)</code> it says</p>

<blockquote>
  <p>"TypeError: get_member() missing 1 required positional argument: 'user_id'".</p>
</blockquote>

<p>This code uses <a href="https://pypi.python.org/pypi/discord.py" rel="nofollow">discord.py</a>:</p>

<pre><code>@client.event
async def on_message(message):
if message.content.startswith('/sendpm'):
    print(message.author)
    j = message.content.replace('/sendpm ', '')
    print(j)
    j = j.replace('@', '')
    j = j.replace('&lt;', '')
    j = j.replace('&gt;', '')
    j = j.replace('!', '')
    print(l)
    k = discord.Server.get_member(j) #problem is here
    await client.send_message(await client.start_private_message(k), spammsg)
    await client.send_message(message.channel, 'sent' + message.author.mention)
</code></pre>

<p>This code is accessing a method of <code>discord.Server</code> as if it was a static method:</p>

<pre><code>k = discord.Server.get_member(j)
</code></pre>

<p>Function <a href="https://github.com/Rapptz/discord.py/blob/v0.13.0/discord/server.py#L132" rel="nofollow"><code>get_member</code> is defined as</a>:</p>

<pre><code>def get_member(self, user_id):
</code></pre>

<p>It accepts <code>self</code> as the first argument because it is meant to be called on an instance, e.g.:</p>

<pre><code>server = discord.Server()
server.get_member(user_id)
</code></pre>

<p>Whether that is the correct way to get a <code>Server</code> instance I do not know. <a href="https://github.com/Rapptz/discord.py/blob/master/examples/new_member.py" rel="nofollow">This example</a> seems to have a different way to get to a server instance:</p>

<blockquote>
<pre><code>@client.event
async def on_member_join(member):
    server = member.server
    fmt = 'Welcome {0.mention} to {1.name}!'
    await client.send_message(server, fmt.format(member, server))
</code></pre>
</blockquote>

python python-3.x