This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import GoogleMobileAds | |
import UIKit | |
final class Interstitial:NSObject, GADInterstitialDelegate{ | |
var interstitial:GADInterstitial = GADInterstitial(adUnitID: interstitialID) | |
override init() { | |
super.init() | |
LoadInterstitial() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import GoogleMobileAds | |
import UIKit | |
final class Rewarded: NSObject, GADRewardedAdDelegate{ | |
var rewardedAd:GADRewardedAd = GADRewardedAd(adUnitID: rewardID) | |
var rewardFunction: (() -> Void)? = nil | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Import Botkit | |
const { Botkit } = require('botkit'); | |
// Import Facebook Adapter | |
const { FacebookAdapter, FacebookEventTypeMiddleware } = require('botbuilder-adapter-facebook'); | |
// Load process.env values from .env file | |
require('dotenv').config(); | |
// Configure Facebook Adapter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(controller) { | |
controller.hears(['Oi', 'Olá!'],'message', async(bot, message) => { | |
await bot.reply(message, 'Olá!'); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(controller) { | |
controller.hears(new RegExp(/^meu nome é (.*?)$/i), 'message', async(bot, message) => { | |
let param = message.matches[1]; | |
await bot.reply(message, `Bem-vindo ${ param }!`); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
controller.hears('get_started', 'facebook_postback', async(bot, message) => { | |
await bot.reply(message, `Vamos começar!`); | |
await bot.reply(message, `Qual é o seu nome?`); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
controller.on('facebook_postback', async(bot, message) => { | |
await bot.reply(message,`Escutei o seguinte postback: ${ message.text }`); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
controller.hears('get_started', 'facebook_postback', async(bot, message) => { | |
await bot.reply(message, `Vamos começar!`); | |
await bot.reply(message, { | |
text: 'Qual é o seu nome?', | |
quick_replies: [ | |
{ | |
title: "Michael", | |
payload: "meu nome é Michael", | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(controller) { | |
// Mensagens | |
controller.hears(['Oi', 'Olá!'],'message', async(bot, message) => { | |
await bot.reply(message, 'Olá!'); | |
}); | |
controller.hears(new RegExp(/^meu nome é (.*?)$/i), 'message', async(bot, message) => { | |
let param = message.matches[1]; | |
await bot.reply(message, `Bem-vindo ${ param }!`); | |
}); |
OlderNewer