124 lines
3.9 KiB
TypeScript
124 lines
3.9 KiB
TypeScript
import { Knex } from "knex";
|
|
|
|
const TABLE = "subscriptions";
|
|
|
|
export async function seed(knex: Knex): Promise<void> {
|
|
// Deletes ALL existing entries
|
|
await knex(TABLE).del();
|
|
|
|
// Inserts seed entries
|
|
await knex(TABLE).insert([
|
|
// pyrss guild
|
|
{
|
|
name: "BBC News · Home",
|
|
url: "http://feeds.bbci.co.uk/news/rss.xml",
|
|
guild_id: "1204426362794811453",
|
|
active: true
|
|
},
|
|
{
|
|
name: "BBC News · World",
|
|
url: "http://feeds.bbci.co.uk/news/world/rss.xml",
|
|
guild_id: "1204426362794811453",
|
|
active: false
|
|
},
|
|
{
|
|
name: "BBC News · Entertainment",
|
|
url: "http://feeds.bbci.co.uk/news/entertainment_and_arts/rss.xml",
|
|
guild_id: "1204426362794811453",
|
|
active: true
|
|
},
|
|
{
|
|
name: "BBC News · Technology",
|
|
url: "https://feeds.bbci.co.uk/news/technology/rss.xml",
|
|
guild_id: "1204426362794811453",
|
|
active: true
|
|
},
|
|
{
|
|
name: "BBC News · Science & Environment",
|
|
url: "https://feeds.bbci.co.uk/news/science_and_environment/rss.xml",
|
|
guild_id: "1204426362794811453",
|
|
active: false
|
|
},
|
|
{
|
|
name: "BBC News · Health",
|
|
url: "https://feeds.bbci.co.uk/news/health/rss.xml",
|
|
guild_id: "1204426362794811453",
|
|
active: true
|
|
},
|
|
{
|
|
name: "BBC News · Politics",
|
|
url: "https://feeds.bbci.co.uk/news/politics/rss.xml",
|
|
guild_id: "1204426362794811453",
|
|
active: false
|
|
},
|
|
{
|
|
name: "BBC News · US & Canada",
|
|
url: "https://feeds.bbci.co.uk/news/world/us_and_canada/rss.xml",
|
|
guild_id: "1204426362794811453",
|
|
active: false
|
|
},
|
|
{
|
|
name: "TechRadar · Phones",
|
|
url: "https://www.techradar.com/uk/feeds/tag/phones",
|
|
guild_id: "1204426362794811453",
|
|
active: true
|
|
},
|
|
|
|
// bot testing guild
|
|
{
|
|
name: "BBC News · Home",
|
|
url: "http://feeds.bbci.co.uk/news/rss.xml",
|
|
guild_id: "819325370087112744",
|
|
active: true
|
|
},
|
|
{
|
|
name: "BBC News · World",
|
|
url: "http://feeds.bbci.co.uk/news/world/rss.xml",
|
|
guild_id: "819325370087112744",
|
|
active: false
|
|
},
|
|
{
|
|
name: "BBC News · Entertainment",
|
|
url: "http://feeds.bbci.co.uk/news/entertainment_and_arts/rss.xml",
|
|
guild_id: "819325370087112744",
|
|
active: true
|
|
},
|
|
{
|
|
name: "BBC News · Technology",
|
|
url: "https://feeds.bbci.co.uk/news/technology/rss.xml",
|
|
guild_id: "819325370087112744",
|
|
active: true
|
|
},
|
|
{
|
|
name: "BBC News · Science & Environment",
|
|
url: "https://feeds.bbci.co.uk/news/science_and_environment/rss.xml",
|
|
guild_id: "819325370087112744",
|
|
active: false
|
|
},
|
|
{
|
|
name: "BBC News · Health",
|
|
url: "https://feeds.bbci.co.uk/news/health/rss.xml",
|
|
guild_id: "819325370087112744",
|
|
active: true
|
|
},
|
|
{
|
|
name: "BBC News · Politics",
|
|
url: "https://feeds.bbci.co.uk/news/politics/rss.xml",
|
|
guild_id: "819325370087112744",
|
|
active: false
|
|
},
|
|
{
|
|
name: "BBC News · US & Canada",
|
|
url: "https://feeds.bbci.co.uk/news/world/us_and_canada/rss.xml",
|
|
guild_id: "819325370087112744",
|
|
active: false
|
|
},
|
|
{
|
|
name: "TechRadar · Phones",
|
|
url: "https://www.techradar.com/uk/feeds/tag/phones",
|
|
guild_id: "819325370087112744",
|
|
active: true
|
|
},
|
|
]);
|
|
};
|