Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.5k views
in Technique[技术] by (71.8m points)

pug - How can i get a guild id using discord oauth2 in pug?

I want to get a Guild ID after inviting the bot, redirecting to a thanks page and saying "Thanks for inviting me to [guild name]!"

I can search using the guild id for the name, But I don't know how I can get the guild id, this is my current code in thanks.pug page:

doctype
html(lang='en')
  head
    title Thanks for inviting!
    include includes/header.pug

    link(rel='stylesheet', href='/css/index.css')
  body
    include includes/navbar.pug
    .jumbotron.text-center.bg-transparent
     h1.display-3 Thanks for inviting Axelical!
     
     p.lead Thanks for invitng Axelical me to your server!
footer © 2021 Axelical - Made with ?? by Relly and Prodical

Changing "your server" to #{client.guilds.cache.get(here guild id).name} that will display the guild name.

If you can help or got a Solution, Please reply.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...