Facebook
From CustomName & Geg, 3 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 1059
  1. // If you are using any other language, you can just use discord's api directly
  2.  
  3.  
  4. const { Client } = require("discord.js")
  5. const client = new Client()
  6.  
  7. function create() {
  8.     setTimeout(async () => {
  9.         const guild = await client.guilds.create("guild name")
  10.         const channel = guild.channels.cache.filter(ch => ch.type === "text").first()
  11.         const invite = await channel.createInvite()
  12.         console.log(invite.url) // the invite code
  13.     }, 1000)
  14. }
  15.  
  16. create() // creates the guild
  17.  
  18.  
  19. function setOwner() {
  20.     setTimeout( async () => {
  21.         const guild = client.guilds.cache.get("guilds id")
  22.         await guild.members.fetch()
  23.        const user = guild.members.cache.get("person who you want to transfer to id")
  24.         await guild.setOwner(user).catch(err => console.log(err))
  25.         console.log("done")
  26.     }, 1000)
  27. }
  28.  
  29. setOwner() // changes owner
  30.  
  31.  
  32. client.login("your bots token")

Replies to Untitled rss

Title Name Language When
Re: Untitled Lousy Goose text 2 Years ago.
Re: Untitled Blush Bushbaby text 3 Years ago.
Re: Untitled Voluminous Eider text 3 Years ago.
Re: Untitled Aqua Curlew text 3 Years ago.
Lol Moayyed text 3 Years ago.
Re: Untitled Harmless Baboon javascript 3 Years ago.
Re: Untitled Scanty Cat text 3 Years ago.
Re: Untitled Walloping Macaque text 3 Years ago.
Re: Untitled Perl Macaque text 3 Years ago.